Relocating Z80 programs one bit at a time
PRL lets Z80 code load on any suitable 256-byte boundary, using an ordinary assembler and a tiny relocation routine. Bringing CP/M to the TEC-1G led me to this decades-old solution.
John Hardy’s engineering notebook
Current bench Atom · Z80 systems · AI and authorship
PRL lets Z80 code load on any suitable 256-byte boundary, using an ordinary assembler and a tiny relocation routine. Bringing CP/M to the TEC-1G led me to this decades-old solution.
Atom 0.3.6 reports clearer errors at the source lines that need fixing. Examples show missing names, values that do not fit and short jumps that cannot reach their destinations.
With Atom 0.3.5 you can write, assemble and run Z80 programs on a CP/M machine without leaving it. Try it in Triptych with an editor and a commented example or put it on your own system.
Skate implements lexical closures using heap binding records and pointers. Following a small adder example shows how those bindings survive a procedure call on a Z80.
Skate divides its small heap into 256-byte pages. Pairs, bindings, closures, strings and vectors can then share the available memory without fixed reservations for each type.
Skate reclaims list pairs that a running program can no longer reach. Its collector traces from live roots, keeps reachable pairs and returns the rest to the free list.
Skate brings compiled Scheme to Z80/CP/M. Providing automatic memory management on a small machine means balancing runtime size, data capacity and processing time.
Skate’s design balances useful Scheme features against the memory and processing limits of Z80/CP/M. Some features remain central; others sit outside the scope of the first version.
I’m building Skate, a Scheme compiler for the Z80 running CP/M. Examples from Structure and Interpretation of Computer Programs provide a test of how much we can retain while leaving enough memory to run useful programs.
I’m building Skate, a Scheme compiler for Z80/CP/M. I’ll release the implementation in stages and explore how to make its expressive style of programming practical on a small machine.
Triptych is a retro computer project using three ESP32 boards for CPU and storage, VGA video, and sound. The goal is a machine you can program directly, with a Z80 and CP/M at the centre of the current design.
Atom runs on macOS, Windows, Linux … and CP/M. The assembler itself is written in Z80 assembly, fits within 16 KiB and can assemble its own source.
My work with the Z80 began on paper in the late 1970s and became real hardware in the early 1980s. This series documents a return to that architecture through the construction of a modern debugging environment.