News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_duncan_bayne

zlisp running (sort of)

Started by duncan_bayne, 16:00, 22 July 13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

duncan_bayne



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.

fano

Nice ! parsing is the first step  ;)
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

TFM

Interesting project. You do write that lisp in C right?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

duncan_bayne

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

duncan_bayne

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

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 ...

Powered by SMFPacks Menu Editor Mod