Handle both di/ei restore cases don't assume we are just stacking disables
; don't allow us to run re-entrant, we've only got one interrupt stack
ld a, (U_DATA__U_ININTERRUPT)
or a
+ jr z, noree
+ push af
+ ld a, #'#'
+ out (21), a
+ pop af
+noree:
jp nz, interrupt_return
inc a
ld (U_DATA__U_ININTERRUPT), a
push af
jr nz, in_kernel
+ ld a, #'U'
+ out (0x01), a
; we're not in kernel mode, check for signals and fault
ld a, #0xC3
cp b ; should be a jump
; mapping as it will vary during kernel activity and the kernel
; wants it put back as it was before
in_kernel_2:
- call map_restore
+ call map_restore
int_switch:
ld sp, (istack_switched_sp) ; stack back
pop af ; so badly
jp po, was_di
ei
-was_di:
- push af
+ jr irqres_out
+was_di: di
+irqres_out: push af
jp (hl)