branlwyd / bdcpu16

DCPU-16 simulator based on version 1.7 of the DCPU-16 specification. See http://dcpu.com/.
0 stars 0 forks source link

skip doesn't work properly with interrupts #11

Closed branlwyd closed 11 years ago

branlwyd commented 11 years ago

Currently, IF* instruction skipping is implemented by setting a skip flag and then checking that flag when executing an instruction. However if an interrupt is received while this is happening, the interrupt handler will continue to skip. This is incorrect.

The solution is to skip all at once before attempting to handle an interrupt.

branlwyd commented 11 years ago

Fixed in bce4f062a890e542bfd128cf2b8906f6352494c8 by checking the skip flag before handling an interrupt in Cpu.skip(). Closing.