> I seem to remember that RETI re-enables the interrupts - when an interrupt > occurs, they are disabled (I think) which is done by setting (resetting?) > the interrupt flip-flops, and RETI restores them to whatever they were > before. > > RET does not touch the interrupt flip-flops, it's just like > POP HL > JP (HL) > > Nige
I know that RETI is described as resetting the interrupts, but it doesn't appear to do so -- I've been stuck in many an interrupt loop because I assumed that. RETN, however, does restore interrupt status. If you think about it, you don't need to restore interrupt status for a RETI anyway -- because if one occurs, you've called it from an interrupt anyway, so interrupts were Enabled on entry. Of course, some people might like to call their own interrupt code with interrupts disabled, but they're just weird. Looking through the Zilog Applications Peripherals manual (1991), RETI is the same as RET, but things that use the zilog daisy chain interrupt structure scan the data bus for the RETI opcode sequence, and use it to release the interrupts so that the next device down in the priority chain can interrupt the system... Simon

