Hallo Ruud, On Fri, Jul 28, 2017 at 09:04:43AM +0200, Ruud@Baltissen.org wrote: > sei ; disable interrupts > rti [snip] >I understand that the looping is caused by not clearing the >interrupt. But the idea was that 'sei' should have prevented that. > >My question: why didn't 'sei' prevent the looping? The SEI instruction inside an IRQ handler makes little sense, because the interrupt flag would already be set upon entering the interrupt handler. Similarly, the RTI instruction would pop the P register from the stack, which would clear the interrupt flag. >PS: I realised that I have to change the code anyway because 'sei' >won't work with NMI. NMI is triggered on a falling edge of the signal. NMI can be effectively disabled by letting the signal to be permanently pulled down, for example by triggering an NMI from the VIA and then not clearing the interrupt status. Marko Message was sent through the cbm-hackers mailing listReceived on 2017-07-28 08:01:21
Archive generated by hypermail 2.2.0.