z80 (cp/m) - uLisp using C99


#1

So a bit of a weekend project here. I started research about moving uLisp to a C standard. I was half way through it when I discovered https://github.com/eliot-akira/ulisp-wasm/tree/main and buried in the repository is the start of a ulisp-zero to C99. From this I’m working with using SDCC. My question is about PROGMEM, how would be best to approach this. As the Z80 platform has 48KB of memory but the first part of memory (100b) is used for system variables. If the uLisp uses 8kb of memory should I set the PROGMEM start exactly on the barrier or say leave a 4Kb spacing to ensure proper gapping?


#2

Which version of uLisp are you starting from? The two main options are:

  • AVR uLisp: 16-bit integer arithmetic, and Lisp objects are 4 bytes.
  • ARM uLisp: 32-bit integer and floating-point arithmetic, and Lisp objects are 8 bytes.

uLisp-Zero is a cut-down version of an early release of AVR uLisp.

I don’t think it matters where uLisp is located in memory; the main restriction is that uLisp’s workspace needs to be a contiguous block of RAM aligned on an object boundary (4 or 8 bytes depending on the platform).