Re: Is access to unpopulated address space "safe"?
Posted: Wed Oct 16, 2013 9:00 pm
BidEd wrote:
Jeff said that the KIM-1 uses NMI, and masks in the high order address bit, so it single-steps only low memory programs and not the monitor itself.
Here's a schematic except from the KIM-1 User Manual (which we have here on 6502.org). The sequence is:
- (loop in upper ROM refreshes LED display and waits for a keystroke)
- user hits the GO key. Registers are loaded (or pushed to stack) from images held in RAM, and an RTI effects a jump to the user program.
- SYNC and RS both go high as the first user instruction commences. If the SST single-step switch is closed, a pulse is presented to NMI, and the resulting interrupt pre-empts further execution of the user program.
- the NMI handler copies the CPU registers to their images held in RAM
- the LED display / keyboard-scan loop resumes
As an alternative to single-stepping, KIM-1 users can also use a BRK instruction to synchronously halt their program, or simply press the ST (stop) push-button to asynchronously do so.
-- Jeff