public void check_timer_event() {
        /* OCI */
        if (m6800.timer_over.D >= m6800.output_compare.D) {
            m6800.output_compare.AddH(1);//OCH++;	// next IRQ point
            m6800.tcsr |= TCSR_OCF;
            m6800.pending_tcsr |= TCSR_OCF;
            MODIFIED_tcsr();
            if ((m6800.cc & 0x10) == 0 && (m6800.tcsr & TCSR_EOCI) != 0) {
                TAKE_OCI();
            }
        }
        /* TOI */
        if (m6800.counter.D >= m6800.timer_over.D) {
            m6800.timer_over.AddL(1);	// next IRQ point

            m6800.tcsr |= TCSR_TOF;
            m6800.pending_tcsr |= TCSR_TOF;
            MODIFIED_tcsr();
            if ((m6800.cc & 0x10) == 0 && (m6800.tcsr & TCSR_ETOI) != 0) {
                TAKE_TOI();
            }
        }
        /* set next event */
        SET_TIMRE_EVENT();
    }