I have a strange behaviour in EP128Emu.
When I unlock the interrupts with EI after there is already an IRQ the following happens:
- the next command after EI will be executed; this is correct
- new #38 is called, which is correct, too
- BUT: instead of having the address of the next command on the stack I have this address increased by 1
Example:
#1000: EI
#1001: LD BC,#1006
#1004: PUSH BC
#1005: JP (HL)
#1006: ...
The IRQ happens between LD BC,#1234 and PUSH BC.
The return address in the Stack should be #1004 now.
But it is #1005. PUSH BC is just skipped, when the IRQ returns
When I add a NOP after the LD BC,#1006 it works...