What's not documented properly in the manual is that reti behaves like retn
in IFF1/2 handling not like ret.
; hence the need to reti
;
-intret2:call map_kernel
+intret2:di
+ call map_kernel
;
; Semantically we are doing a null syscall for pre-empt. We need
; to record ourselves as in a syscall so we can't be recursively
push af
ex af, af'
exx
- push bc ; FIXME we don't I tihnk need to save bc/de/hl
+ push bc ; FIXME we don't I think need to save bc/de/hl
push de ; as they are compiler caller save
push hl
exx
; and the controllers have seen the
; reti M1 cycle. However we still
; have DI set
-
+ di ; see undocumented Z80 notes on RETI
;
; We are now on the syscall stack (which is fine, we don't
; pre-empt mid syscall so therefore it is free. We will now