uc80
A C compiler for the Z80 and CP/M, tuned for small code size. It produced smaller binaries than z88dk on all 47 tests of a public benchmark suite.
Portfolio
Compilers that target processors discontinued forty years ago, emulators that run the resulting binaries, and a reconstruction of source code the industry lost. The constraints are real — 64 KB of address space, no floating-point unit, a byte of code actually matters — which makes every result measurable.
Modern frontends, vintage backends. uc80 and uc386 share one C23 frontend and diverge only at the target.
A C compiler for the Z80 and CP/M, tuned for small code size. It produced smaller binaries than z88dk on all 47 tests of a public benchmark suite.
A C23 compiler for the i386 and MS-DOS. It writes self-contained DOS .exe files. It compiled both DOOM and MicroPython end to end.
The shared C23 frontend and AST optimizer behind uc80 and uc386. It parses, preprocesses and optimizes above the machine level. The target backend then emits Z80 or i386 from there.
A MicroPython port for FreeDOS on i386, compiled entirely through uc386. The port is the proof that the compiler works on a real codebase. The build emits a flat binary or a PMODE/W executable with a working REPL.
A PL/M-80 compiler for the 8080 and Z80. It rebuilds the original CP/M utilities from their PL/M-80 sources and matches the Digital Research compiler on code size.
A Cowgol compiler for the Z80 and CP/M. It analyzes the call graph across modules so subroutines that can never be live at once share the same local storage.
An Ada compiler for the Z80 and CP/M 2.2. It compiles a subset of Ada 2012 to Z80 assembly. Work toward ACATS conformance continues.
More than ninety worked Ada examples for uada80. They cover syntax, packages, generics, tasking and contracts.
An LR(1) and GLR parser generator. It emits the lexer and parser tables as a single JSON bundle plus re-entrant driver skeletons in C, C++, Python and Lua.
The unglamorous half of a toolchain, where most of the size and speed actually comes from.
A peephole optimizer for Z80 compilers. It shortens jumps to jr, folds counted loops into djnz, rewrites call/ret pairs as jp, and drops dead stores.
A peephole optimizer for i386 compilers that emit NASM. It rewrites instruction patterns, strips unreachable functions, and splits a libc so a program links only what it calls.
A MACRO-80-compatible toolchain for Linux: the um80 assembler, ul80 linker, ulib80 librarian and ud80 disassembler. Together they build and inspect 8080 and Z80 .COM files.
A pure-Python linker that reads 32-bit OMF object files and writes MZ+LE executables for DOS. It adds a PMODE/W or DOS/32A stub, so the result runs without dos4gw.exe or Open Watcom.
A peephole and AST optimizer for 8080/Z80 compilers. upeepz80 and uc_core supersede it. It stays here for reference.
Two different strategies: emulate the hardware faithfully, or intercept the system calls and translate them to the host. Each is the right answer to a different question.
Runs CP/M 2.2 programs on Linux and Windows with no disk image at all: it translates BDOS and BIOS calls straight to the host filesystem. Z80 and 8080 CPU cores.
A hardware-level Z80 emulator for the RomWBW HBIOS interface, with bank switching across 512 KB of ROM and 512 KB of RAM. It boots CP/M from ROM and from disk images.
A native Windows build of the RomWBW emulator, with a VT100 terminal and scrollback. It boots CP/M or ZSDOS from disk images.
The same emulator for Android phones and tablets, with a VT100 terminal, so Zork and WordStar run unmodified.
The iOS and macOS build. It runs CP/M 2.2 and CP/M 3, and downloads disk images from the RomWBW project. It ships on the App Store as Z80CPM.
An emulator for MP/M II, the multi-user CP/M. Several people connect over SSH simultaneously, and SFTP and HTTP clients read the same disks. The build compiles MP/M II from its PL/M-80 sources.
A DOS emulator for iPad and Mac with a SwiftUI interface over DOSBox Staging. It boots FreeDOS, MS-DOS or the built-in kernel, and runs DOOM.
An MS-DOS emulator for Linux that runs 32-bit DJGPP programs end to end. It answers INT 21h, DPMI and EMS calls on the host over an i386 CPU core.
MBASIC 5.21 four ways. One of them reconstructs source code that no longer exists anywhere.
A reconstruction of the lost MBASIC 5.21 source. The recovered MACRO-80 source assembles to a binary that matches the original mbasic.com byte for byte — the only proof of correctness that counts here.
A Python interpreter for MBASIC 5.21 that runs original programs unmodified. The repository also has two compiler backends, which target CP/M .COM files and JavaScript.
A C++17 interpreter for the same dialect. It runs on Linux and macOS. A DJGPP build also runs on FreeDOS and MS-DOS.
mbasicc compiled to WebAssembly with Emscripten, wrapped in a program editor and a virtual filesystem.
A floating-point BASIC for the 8080 and CP/M. The repository includes the translator that converted the original 8008 sources. 38 of 39 tests pass.
Infocom shipped a portable bytecode virtual machine in 1979. These projects compile to it, interpret it, document it and solve the games written for it.
A compiler for Infocom ZIL and the ZILF dialect. It emits Z-machine story files from .z3 to .z8, and compiles the Mini-Zork I source to a verified 350-of-350 win.
A walkthrough generator for Z-machine interactive fiction: a CZECH-compliant interpreter, an AI solver and a replay harness. It has 50 verified complete solutions across versions 1 through 8.
A specification of the Z-machine story-file format for versions 1 through 8, with a compliance test corpus. Every rule states which versions it applies to. The specification follows the Z-Machine Standards Document v1.1.
Compiles Z-machine story files (versions 1 through 8) to JavaScript that runs in a browser or under Node.
A debugging tool that renders a story file as a PDF. The output has a room map with movement directions, the dictionary, and the objects a player can carry.
A voice-controlled Z-machine interpreter for iOS and macOS. Speech recognition happens on the device, and the app reads the game text aloud. Players with low vision can thus play Zork with no screen at all.
An unpacker for the CP/M archive formats — LBR, ARC, squeeze, crunch and CrLZH. A Python 3 implementation and a native CP/M implementation produce identical output.
Vintage manuals as PDFs and text conversions. They cover CP/M, MP/M II, Z80, 8008, MACRO-80, PL/M-80 and Microsoft BASIC. Reference material for everything above.
Most of this exists because someone needed it to. If a project here is close to what you need but missing the last mile — a target, a format, a platform — that is exactly the kind of work I take on.