README
November 20, 2015 ยท View on GitHub
Herein ye shall find a Scheme interpreter for the Commodore 128.
I have included a disk image (scheme.d64) in the repo in case you don't want to bother with compiling and just use Scheme with VICE or your Commodore straight away.
If you want to build the Scheme interpreter you will need:
- The VICE emulator (to generate .d64 disk image) http://vice-emu.sourceforge.net
- The cc65 C compiler, assembler, linker http://cc65.github.io/cc65/
You can probably use other platforms supported by cc65. Just change the SYS target platform in the Makefile.
To build the Scheme interpreter: make CC65_HOME=/path/to/cc65
The create a disk image (scheme.d64): make disk
The Scheme implementation is based on Peter Michaux's Scheme from Scratch article: http://peter.michaux.ca/articles/scheme-from-scratch-introduction
I made some changes to the Scheme syntax to suit the CBM:
- Character literals are expressed using #% instead of #\
- You can quote double-quotes in a string using percent (%", not ")
- Use #%newline and #%space for newline and space in strings
- Symbols can only be up to 10 characters long
- Built-in procedure names have been shorteded to fit the 10 char limit
TODO:
- Provide line history/navigation in interpreter using arrow keys
- Provide a way to read Scheme source from a text file
BUGS:
- Memory is never freed, even when re-running the program. I guess this has something to do with how cc65 implements malloc...
Enjoy! Kirk Martinez