Close

A Lisp-Based Development Ecosystem for Resource-Constrained Platforms

A project log for XiAleste

XiAleste Next is an 8-bit home computer, which is compatible with software for the Amstrad CPC6128 released on 13 June 1985

h2wh2w 11/22/2025 at 18:210 Comments

I am currently working on a project where a recurring challenge is determining how to develop the necessary software for the target platform. Naturally, developing directly on the platform itself is not feasible, as it lacks even minimal development tools. Even if such tools existed, the platform isn't suited for serious software development, as it is, after all, a video game console.

While contemplating this, I have conceived the following architecture:

    Foundation Layer: At the core lies a Lisp interpreter and a REPL (Read-Eval-Print Loop). These are designed not only for task automation but also for interactive debugging. Furthermore, the interpreter's parsing capabilities are used for processing S-expressions.

    Compilation Layer: The next level consists of a compiler and a type system. Their purpose is to transform source code into instructions for a virtual machine and to populate the constant pool with data described in Lisp. The output from this stage is a set of C source files and a binary file. These C files, along with additional libraries (for I/O, rendering, etc.), are then compiled into an executable for the target platform.

    Execution Layer: The final level is a virtual machine that runs on the target platform. It executes the binary file and, when necessary, hands over control to natively compiled C code.

This architecture ensures controlled multitasking and a secure software environment. In simpler terms, an error will never cause the processor to crash into a void. Instead, it results in a specific error message pointing to the source file where the issue originated or was detected.

In the first week, I successfully implemented the interpreter and REPL. The following week, I built the type system. I am now finalizing the virtual machine, leaving only the compiler to be written. The project is incredibly engaging, and I hope I have the stamina and motivation to see it through to completion.

Oh, and the primary motivation for this project is that it is a necessary component for another project. However, it can be easily adapted for other platforms like RISC-V or ARM, or even for use in microcontrollers.

A system diagram is attached below.

Discussions