Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KirkMartinez/cbm-scheme
Simple Scheme interpreter for Commodore (and other 6502) machines
https://github.com/KirkMartinez/cbm-scheme
Last synced: 2 months ago
JSON representation
Simple Scheme interpreter for Commodore (and other 6502) machines
- Host: GitHub
- URL: https://github.com/KirkMartinez/cbm-scheme
- Owner: KirkMartinez
- Created: 2015-11-06T18:12:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-20T19:05:46.000Z (about 9 years ago)
- Last Synced: 2024-04-24T16:15:14.197Z (9 months ago)
- Language: C
- Size: 30.3 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- AwesomeInterpreter - cbm-scheme
README
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:
1. The VICE emulator (to generate .d64 disk image)
http://vice-emu.sourceforge.net
2. 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/cc65The 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-introductionI 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 limitTODO:
- Provide line history/navigation in interpreter using arrow keys
- Provide a way to read Scheme source from a text fileBUGS:
- 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