Monitor: Z-80 assembler (ASM "file", A addr)

Two-pass table-driven assembler in the monitor: assembles BASIC-saved
source files from the file system, or one line at a time with A addr.
Labels, EQU/ORG/DB/DW/DS/END, expressions. Table generated from the
disassembler (tools/gen-asmtab.py); round-trip and sdasz80 tests, plus a
Z-80 build run in z80emu. Monitor RAM grows to 6000-7FFF for the symbol
table. Works around an SDCC 4.5 inline strcpy bug with s_copy().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
brad ArantandClaude Opus 5.5 committed 2026-11-28 16:42:42 -08:00
1 parent 88b5942da5
commit fe1daf180d
16 files changed
+14320 -13257

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ cd "$(dirname "$0")"
mkdir -p out
sdasz80 -plosgff out/crt0.rel crt0.s
sdcc -mz80 --opt-code-size --max-allocs-per-node 20000 --std-sdcc11 -c -o out/monitor.rel monitor.c
sdcc -mz80 --no-std-crt0 --code-loc 0x0180 --data-loc 0x7000 -o out/monitor.ihx out/crt0.rel out/monitor.rel
sdcc -mz80 --no-std-crt0 --code-loc 0x0180 --data-loc 0x6000 -o out/monitor.ihx out/crt0.rel out/monitor.rel
python3 ../tools/ihx2mem.py out/monitor.ihx out/monitor-full.bin out/monitor-full.mem
head -c 32768 out/monitor-full.bin > monitor.bin
head -n 32768 out/monitor-full.mem > monitor.mem