MicroBot-8bit is an 8-bit microcomputer in the vein of the ZX Spectrum/Commodore 64, originally inspired by CHIP-8. It comes with a tiny CP/M-like OS layer, a GPU TTY, keyboard input, and a disk-backed filesystem stub.
mb8.mov
The assembler is implemented in Rust and is part of this workspace. No external assembler is required.
Build the kernel and user-space programs:
make allTo assemble one file directly:
cargo run --quiet -p asm -- build user/sh.asm -o user/sh.binCheck a source without writing a binary (warnings cause a non-zero exit code):
cargo run --quiet -p asm -- check user/sh.asmTargets:
make kernel— build the kernel image (kernel/main.bin)make user— build user-space programs underuser/
After building, run the VM with the kernel entrypoint first and then any user programs:
make runThe first path is always the kernel; subsequent arguments are user-space binaries loaded by the OS.
User-space programs live under user/. For a minimal shell example, see user/sh.asm; build with make user and run with the kernel:
make runThere was an attempt to build a compiler for a high-level programming language targeting this platform, but it did not work out. The latest work on that compiler can be seen in commit 57ce5eba284f069251eb0563cf06fe6a24da53d7.
Full documentation can be found in the book.