Relocated monitor to top 16k

This commit is contained in:
Joppe Blondel
2026-09-28 13:54:52 +02:00
parent bedcbfdd24
commit 53b44adcef
3 changed files with 71 additions and 24 deletions
+17 -2
View File
@@ -1,7 +1,14 @@
# Z80 UART monitor
This ROM provides a small interactive monitor on the UART/CTC card at I/O base
`20`. Connect a terminal at **2400 baud, 8 data bits, no parity, 1 stop bit**.
`20`. At reset, a small ROM bootstrap copies the monitor into the top 16 KiB of
RAM at `C000-FFFF` and starts it there. Only the occupied vector/code bytes are
stored and copied; uninitialized data is cleared directly in high RAM. The low ROM can subsequently be disabled
without taking the monitor, its data, or its interrupt table away. Runtime code
and vectors occupy the lower part of this window, globals begin at `F000`, and
the stack grows downward from `FFFF`; no RAM below `C000` is used.
Connect a terminal at **2400 baud, 8 data bits, no parity, 1 stop bit**.
Commands are case-insensitive and all numeric arguments are hexadecimal; an
optional `0x` prefix is accepted.
@@ -26,4 +33,12 @@ make
```
The outputs are `build/metal/monitor.bin` (32 KiB ROM image) and
`build/metal/monitor.prog.bin` (compact programmer image).
`build/metal/monitor.prog.bin` (compact programmer image). The ROM layout is:
- `0000-007F`: reset/copy bootstrap
- `0080...`: compact vector/code image copied to RAM starting at `C000`
- Remaining bytes: unused and available for additional ROM content
The monitor executable starts at `C080`; its IM 2 vector table is at `C040`.
`monitor.prog.bin` ends immediately after the occupied payload, while
`monitor.bin` remains a complete 32 KiB chip image.