Z80 Documentation
The Z80 is an 8 bit CPU with 64 KB of memory, a handful of 8 bit registers that pair up into
16 bit ones, and no memory management of any kind: a program owns the whole address space.
Programs here are assembled at .org 0x8000, above the reset and rst vectors, with the stack pointer starting at the top of memory. Execution
ends when the program reaches a halt, when a top level ret returns,
or when it simply runs off the end of the assembled code.
The Z80 has no system calls: it talks to the outside world through the in and out instructions, which address one of 256 ports. This emulator wires the first five ports to the
console, so a program can print characters and numbers and read a line back.