zlisp running: non-evaluating REPL on Vimeo (https://vimeo.com/70784619)
I've got zlisp (my simple Lisp implementation for the Amstrad CPC series) running. At the moment it's not even vaguely usable: it parses simple atoms (strings, integers, and symbols) and prints them. The parser can't handle lists, and there's no eval, so there's a lot of work to do :)
But I'm making progress, albeit slowly.
Nice ! parsing is the first step ;)
Interesting project. You do write that lisp in C right?
Quote from: fano on 19:50, 22 July 13
Nice ! parsing is the first step ;)
Actually I did the cons cells & printing of same first, so I could hook up a rudimentary parser and see things running end to end. E.g.:
https://github.com/duncan-bayne/zlisp/blob/master/tests/cons_cell_tests.c (https://github.com/duncan-bayne/zlisp/blob/master/tests/cons_cell_tests.c)
Quote from: TFM/FS on 20:27, 22 July 13
Interesting project. You do write that lisp in C right?
Yes, except for a few bits of assembler to interface with the Amstrad firmware, e.g.:
https://github.com/duncan-bayne/zlisp/blob/master/src/amstext.s (https://github.com/duncan-bayne/zlisp/blob/master/src/amstext.s)
I'm still puzzling about how to give easy access to the complete firmware through Lisp. I was thinking maybe inline machine code could be a first, hacky, approach:
(eval-z80 (#x3e #x65 #xcd #x5a #xbb #c9))
Which is somewhat horrible but could actually work pretty well for simple fragments. Stuff like cassette or disc I/O would be better served with a proper Lisp library however.
Decisions, decisions ...