6502 interrupts |
|||
model-b
|
If interrupts are reenabled with Assume an interrupt is pending, and it is one the interrupt handler doesn't
acknowledge. If interrupts are disabled and then reenabled, one might
expect the 6502 to get stuck after the The following code does not result in infinite interrupts, however:
Instead, just one interrupt occurs. The interrupt occurs after SEI,
so when the handler returns the I flag is still set, and the IRQ is inhibited.
(Until the next The following code will give the expected effect:
So far, the only BBC game I've seen that needs this exact behaviour is
Empire Strikes Back. It disables the OS' handling
of the timer interrupt, but doesn't disable the interrupt itself, and
then calls an OS routine that ends up doing a This has been noticed by others: |
||
|