Saturday, April 14, 2012

High-level Languages for the 6502

What's up, hackers? I know you guys don't particularly care about this subject, but I am have become temporarily obsessed with it, so here for your perusal, my research on high-level languages for the 6502!

Common-Lisp assembler - This is lisp-syntax assembler. Except you can also use lisp structures such as conditionals and loops. You can also define new lisp functions. It compiles to normal assembly. So I think it's more like macros than an actual lisp runtime. (See also COMFY)

Python on a chip - A subset of python syntax and VM!
  • Requires roughly 55 KB program memory
  • Initializes in 4KB RAM; print "hello world" needs 5KB; 8KB is the minimum recommended RAM.
  • Supports integers, floats, tuples, lists, dicts, functions, modules, classes, generators, decorators and closures
  • Supports 25 of 29 keywords and 89 of 112 bytecodes from Python 2.6
  • Can run multiple stackless green threads (round-robin)
  • Has a mark-sweep garbage collector
  • Has a hosted interactive prompt for live coding
  • Licensed under the GNU GPL ver. 2
Lots of great stuff about 6502 languages, particularly Forth. - Great info on how to implement your own languages on the 6502. Forth is an obvious choice, but I haven't found any good Forth implementations as of yet. There seem to be a lot of Forth projects that may or may not be related which I need to evaluate.