I thought that, as long as I preserve the registers I use in my interrupt code, I should be good. With this is mind I find the case below strange.
My interrupt-routine ("myLeanInterruptRoutine") uses only A(F) and HL-register, and is doing IN and OUT from port 0x99.
And here is the deal: Stub A works fine / system runs fine ("EXX-code"). Stub B makes the line interrupts trigger only in random frames ("POP-CODE").
Stub A
0x0038: exx push af push hl call myLeanInterruptRoutine pop hl pop af exx ei reti
Stub B
0x0038: push af push hl call myLeanInterruptRoutine pop hl pop af ei reti
From the image below you can see that the only things changed during the stub's entry and exit is the PC-reg, R-reg and EI is set as the last instruction.

(In case you wonder why i care to optimize this hard - it's part of screensplits, and I generally want to keep interrupt time to a minimum. Also, with split-effects, I want the time from the incurred line-interrupt happens to pc reaches my "custom" code, to be kept to an absolute minimum as well)
Why? Why do I need those exx's? Somehow the line-interrupts/VDP is affected by this. Known thing?

.