I think the intent is for the interrupt hardware to insert a reset
instruction into the instruction fetch cycle.
for example.
main code
.
.
.
Save any registers that might be used by the interrupt routine
HLT
<Interrupt hardware inserts a RST Instruction>
Restore registers from before the interrupt
.
.
.
interrupt handler
<process interrupt>
RET (returns from interrupt)
It is the responsibility of the calling program to preserve any of the
registers that the interrupt handler might use prior to using the HLT
instruction.
Since the documentation does not state that the condition codes are
preserved by an interrupt any other method may cause incorrect program
operation.
On 12/24/2025 3:01 PM, Robert Armstrong via cctalk wrote:
Tom Uban
<uban(a)ubanproductions.com> wrote:
Here is the power-up/interrupt code I use on a board I built: ...
Thanks! A
couple of questions -
It looks like this code trashes DE, so I assume the background code just can't use
those registers? So there's no way to code a truly transparent ISR?
I also notice that the 8008 lacks any kind of interrupt enable F-F, nor any EI/DI type
instructions. Is that right? I guess you could always implement those with external
hardware, at least.
And the big question - what's your code for restoring these flags when you exit
the ISR? The MCS-8 manual says that all ALU instructions always update all flags, with
the exception of the rotate opcodes which only change carry. It seems that means the
ZS&P flags at least would have to be restored together in one instruction.
Bob