smbaker
Experienced Member
The 8008 supports interrupts. You can raise an interrupt, where you'll get an acknowledgement and the opportunity to insert an arbitrary instruction, such as using a RST<n> to jump to a particular interrupt vector. Easy enough.
The 8008 does not implement arbitrary push and pop, It only implements a special-purpose stack that holds PC. The RST<n> instruction will push PC onto this stack. So you can enter your interrupt service routine, and you can exit your interrupt service routine. (If you have stack space; the stack is only 8 words long)
However, if you cannot save the status of your registers, you can't do much else inside your ISR. You could write them all to temporary RAM locations, but so far as I can tell the only way to write a register to RAM is by using the HL (M) register. At the very minimum you'd have to clobber H and L. Saving the flags would be tricky but doable using a series of conditional jumps.
Am I missing anything? Were interrupts just not used on the 8008, other than waking it from an HLT ?
Scott
The 8008 does not implement arbitrary push and pop, It only implements a special-purpose stack that holds PC. The RST<n> instruction will push PC onto this stack. So you can enter your interrupt service routine, and you can exit your interrupt service routine. (If you have stack space; the stack is only 8 words long)
However, if you cannot save the status of your registers, you can't do much else inside your ISR. You could write them all to temporary RAM locations, but so far as I can tell the only way to write a register to RAM is by using the HL (M) register. At the very minimum you'd have to clobber H and L. Saving the flags would be tricky but doable using a series of conditional jumps.
Am I missing anything? Were interrupts just not used on the 8008, other than waking it from an HLT ?
Scott