public static void ENTER_INTERRUPT(String message, int irq_vector) {
        //LOG((errorlog, message, cpu_getactivecpu()));
        if ((m6800.wai_state & (M6800_WAI | M6800_SLP)) != 0) {
            if ((m6800.wai_state & M6800_WAI) != 0) {
                m6800.extra_cycles += 4;
            }
            m6800.wai_state &= ~(M6800_WAI | M6800_SLP);
        } else {
            PUSHWORD(m6800.pc);
            PUSHWORD(m6800.x);
            PUSHBYTE(m6800.a);
            PUSHBYTE(m6800.b);
            PUSHBYTE(m6800.cc);
            m6800.extra_cycles += 12;
        }
        SEI();
        m6800.pc = RM16(irq_vector);
        CHANGE_PC();
    }