ChecksMix
MMIX-first assembler and emulator with fast feedback for learning, experimenting, and debugging Knuth’s 64-bit machine. MIX source still parses and emulates, but the checksmix now focuses on MMIX with .mms and .mmo workflows.
What’s inside
checksmix: execute.mmsassembly directly or run prebuilt.mmoobject files.mmixasm: assemble.mmsto.mmofor reuse or distribution.- Emulator: 256 general-purpose registers, 32 special registers, sparse 64-bit address space, and basic TRAP support (Halt and Fputs for console output).
Quick start
- Install Rust (stable toolchain).
- From the repo root, run an example immediately:
Or build once for repeat runs:
Set RUST_LOG=checksmix=debug to see instruction decoding and TRAP handling while you experiment.
Common workflows
Run MMIX assembly directly
checksmix parses and executes .mms without producing an object file:
Assemble to MMO, then emulate
Generate a reusable object file with mmixasm, then run it with checksmix:
# Assemble
# Execute the MMO
Use your own program
- Write MMIX assembly (see the snippet below).
- Run it directly with
checksmixor assemble withmmixasmand run the resulting.mmo. - Inspect register and memory dumps printed before and after execution.
Example programs
examples/hello_world.mms: prints a string viaTRAP 0,Fputs,StdOut.examples/linked_list.mms: walks a statically allocated list and sums node values.examples/all_instructions_test.mms: broad instruction coverage for regression checks.
Hello World (trimmed):
LOC Data_Segment
GREG @
Text BYTE "Hello world!",10,0
LOC #100
Main LDA $0,Text
TRAP 0,Fputs,StdOut
TRAP 0,Halt,0
Legacy MIX support
.mix and .mixal files still run through checksmix, but MMIX is the primary target. Prefer .mms/.mmo for new work.