30 lines
1.0 KiB
Markdown
30 lines
1.0 KiB
Markdown
# 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**.
|
|
Commands are case-insensitive and all numeric arguments are hexadecimal; an
|
|
optional `0x` prefix is accepted.
|
|
|
|
| Command | Action |
|
|
| --- | --- |
|
|
| `D 8000` | Dump 40 bytes starting at address 8000 |
|
|
| `D 8000 20` | Dump 20 bytes starting at address 8000 |
|
|
| `W 8000 3E 41 D3 25 C9` | Write bytes starting at address 8000 |
|
|
| `I 20` | Read I/O port 20 |
|
|
| `O 20 57` | Write 57 to I/O port 20 |
|
|
| `G 8000` | Execute code at address 8000 |
|
|
| `HELP` | Show the command summary |
|
|
|
|
`G` transfers control with a return address on the stack, so code ending in
|
|
`RET` returns to the monitor. Code that changes the stack pointer, interrupt
|
|
mode, or UART/CTC setup must restore it before returning.
|
|
|
|
Build the ROM and programmer-format images with:
|
|
|
|
```sh
|
|
make
|
|
```
|
|
|
|
The outputs are `build/metal/monitor.bin` (32 KiB ROM image) and
|
|
`build/metal/monitor.prog.bin` (compact programmer image).
|