;; Monitor trampoline, the same bytes in BASIC's ROM and in the monitor's. ;; Both copies must match: when port 60h switches the bank, the CPU may already ;; have read the next bytes from the other one. ;; 0066 NMI: save AF, bring the monitor bank in, enter the monitor at 0100h ;; 0070 leave: A goes to port 60h (bank out, bit 1 = stop after one ;; instruction), then AF and PC come off the program's stack .org 0x0066 push af ld a, #1 out (0x60), a jp 0x0100 .org 0x0070 out (0x60), a pop af retn