A generic Intel 8080 assembler written in TypeScript. Runs with Bun.
Built primarily to assemble the Radio-86RK monitor ROM, but works with any Intel 8080 source.
Assemble a source file:
bun run asm8.ts <source.asm> [--one|--split]--one(default) — produces a single 64 KB file0000-FFFF.binwith sections placed at their addresses--split— produces one file per section, namedSSSS-EEEE.bin
A section map is printed to stdout:
F800-FFFF 2048 bytes
- Two-pass assembly (forward references resolved automatically)
- Case-insensitive mnemonics, registers, and symbols
- All documented Intel 8080 instructions
- Directives:
org,db,dw,equ,end - Number formats: decimal (
255), hex withhsuffix (0FFh) - Character literals:
'A'(usable anywhere a byte value is expected) - Strings in
db:db "hello"ordb 'hello' - Expressions with
+and-:lxi h, base + offset - 1
bun testtests/asm8.test.ts— assemblesmonitor.asmand verifies byte-identical output againstmon32.bintests/asm8-instructions.test.ts— exercises all 8080 instruction encodings, directives, expressions, labels, and edge cases
target/monitor.asm— Radio-86RK monitor ROM source (1494 lines)target/mon32.bin— expected binary output (2048 bytes, F800-FFFF)