All pastes #179995 Raw Edit

Anonymous

public c v1 · immutable
#179995 ·published 2006-09-22 18:45 UTC
rendered paste body
        if (IME == 1 && ( Reg(IF) & Reg(IE) )) {                int which = (Reg(IF) & Reg(IE));                PUSH(PC);                IME = 0;                /* which interrupt? */                if      ( which & INT_VBLANK) PC = 0x40; Reg(IF) ^= INT_VBLANK; break;                else if ( which & INT_LCDC  ) PC = 0x48; Reg(IF) ^= INT_LCDC;   break;                else if ( which & INT_TIMER ) PC = 0x50; Reg(IF) ^= INT_TIMER;  break;                else if ( which & INT_SERIAL) PC = 0x58; Reg(IF) ^= INT_SERIAL; break;                else if ( which & INT_KPAD  ) PC = 0x60; Reg(IF) ^= INT_KPAD;   break;        }