Z88 Developers' Notes
Contents   Contents of System Calls

OZ_Ei, Restore old interrupt state

CALL $0054

IN:

            A = old I register
            Fc = old interrupt status (Fc = 1 disabled; Fc = 0 enabled)

OUT:        -

Registers changed after return:
            AFBCDEHL/IXIY same
            ......../.... different

Notes:

It is very important to use this call and not use the Z80 interrupt instructions because of a hardware bug in the Z80, which allows for interrupts to occur while reading the interrupt status. Note that disabling interrupts should be avoided if possible and that NMI (Non Maskable Interrupts) will still occur. If a HALT is executed when interrupts are disabled the system will stop. HALT should not be used anyway, nor should EI, DI or IM <n>.