4 ms·
While staying portable across architectures, probably not. But you can make a little language that's nicer to jse than assembly for a particular CPU. COMFY-65
by trealira 3y ago
While staying portable across architectures, probably not. But you can make a little language that's nicer to jse than assembly for a particular CPU.
COMFY-65 is a compiler for a small Lisp language that provides all non-branching operations of the 6502 processor as primitives (e.g. tests for carries, overflows, zero, and negative; set decimal arithmetic mode; etc.). However, programs still consist of subroutines, loops, and tests, with no "go to label" construct provided. It's surprisingly simple and, I would say, elegant.
Here's the PDF that outlines it: https://dl.acm.org/doi/pdf/10.1145/270941.270947 https://dl.acm.org/doi/pdf/10.1145/270941.270947