//;0x0128 IRQ10
void  INT_Excep_IRQ10(void) {
    QF_ISR_ENTRY();  /* inform the QF Vanilla kernel about entering the ISR */

    QACTIVE_POST(AO_Table, Q_NEW(QEvt, MAX_PUB_SIG),    /* for testing... */
                 &QS_Excep_IRQ10);
    QF_ISR_EXIT();    /* inform the QF Vanilla kernel about exiting the ISR */
}
Example #2
0
/*..........................................................................*/
static void interrupt ISR_tmr() {
    QF_ISR_ENTRY();                                /* QF-specific ISR entry */

    QF_tick();                              /*<-- process the QF clock tick */

    QF_ISR_EXIT();                                  /* QF-specific ISR exit */
}
Example #3
0
/*..........................................................................*/
void interrupt ISR_tmr(void) {
    QF_ISR_ENTRY();                                /* QF-specific ISR entry */

    QF_TICK(&l_tmr);          /* call QF_tick() outside of critical section */
#ifdef Q_SPY
    l_tickTime += 0x10000;                           /* add 16-bit rollover */
#endif

    QF_ISR_EXIT();                                  /* QF-specific ISR exit */
}
//;0x0070  CMTU0_CMT0
void  INT_Excep_CMTU0_CMI0(void) {
    QF_ISR_ENTRY();  /* inform the QF Vanilla kernel about entering the ISR */

#ifdef Q_SPY
    QS_tickTime_ += QS_tickPeriod_;       /* account for the clock rollover */
#endif
    QF_TICK(&QS_Excep_CMTU0_CMT0);         /* process all armed time events */

    QF_ISR_EXIT();    /* inform the QF Vanilla kernel about exiting the ISR */
}
Example #5
0
//............................................................................
static void interrupt ISR_tmr(void) {
    QF_ISR_ENTRY();

    QF::TICK(&l_tmr);                         // process all armed time events
    static QEvt const tickEvt = { TIME_TICK_SIG, 0 };
    QF::PUBLISH(&tickEvt, &l_tmr);                   // publish the tick event

#ifdef Q_SPY
    l_tickTime += 0x10000;
#endif


    QF_ISR_EXIT();
}
Example #6
0
/*..........................................................................*/
static void interrupt ISR_tmr() {
    static QEvt const tickEvt = { TIME_TICK_SIG, 0, 0 };

    QF_ISR_ENTRY();                                /* QF-specific ISR entry */

    QF_TICK(&l_tmr);          /* call QF_tick() outside of critical section */
    QF_PUBLISH(&tickEvt, &l_tmr);                 /* publish the tick event */

#ifdef Q_SPY
    l_tickTime += 0x10000;
#endif

    QF_ISR_EXIT();                                  /* QF-specific ISR exit */
}
Example #7
0
/*..........................................................................*/
static void interrupt ISR_kbd() {
    uint8_t key;
    uint8_t kcr;

    QF_ISR_ENTRY();                                /* QF-specific ISR entry */

    key = inp(0x60);              /* key scan code from 8042 kbd controller */
    kcr = inp(0x61);                       /* get keyboard control register */
    outp(0x61, (uint8_t)(kcr | 0x80));       /* toggle acknowledge bit high */
    outp(0x61, kcr);                          /* toggle acknowledge bit low */

    BSP_onKeyboardInput(key);     /* process the key (application specific) */

    QF_ISR_EXIT();                                  /* QF-specific ISR exit */
}
Example #8
0
/*..........................................................................*/
static void interrupt ISR_kbd() {
    static uint8_t ship_pos = GAME_SHIP_Y;
    uint8_t key;
    uint8_t kcr;

    QF_ISR_ENTRY();                                /* QF-specific ISR entry */

    key = inp(0x60);              /* key scan code from 8042 kbd controller */
    kcr = inp(0x61);                       /* get keyboard control register */
    outp(0x61, (uint8_t)(kcr | 0x80));       /* toggle acknowledge bit high */
    outp(0x61, kcr);                          /* toggle acknowledge bit low */

    switch (key) {
        case 200:                                               /* Up-arrow */
        case 208: {                                           /* Down-arrow */
            ObjectPosEvt *ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
            if ((key == (uint8_t)200) && (ship_pos > 0x00)) {
                --ship_pos;
            }
            else if ((key == (uint8_t)208)
                     && (ship_pos < (GAME_SCREEN_HEIGHT - 3))) {
                ++ship_pos;
            }
            ope->x = (uint8_t)GAME_SHIP_X;           /* x-position is fixed */
            ope->y = (uint8_t)ship_pos;
            QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_kbd);    /* to the ship */

            Video_printNumAt(24, 24, VIDEO_FGND_YELLOW, ship_pos);
            break;
        }
        case 57: {                                                 /* Space */
            static uint16_t ntrig = 0;
            static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0, 0 };
            QF_PUBLISH(&fireEvt, &l_kbd);

            Video_printNumAt(47, 24, VIDEO_FGND_YELLOW, ++ntrig);
            break;
        }                                                            /* Esc */
        case 129: {
            static QEvt const quitEvt = { PLAYER_QUIT_SIG, 0, 0 };
            QF_PUBLISH(&quitEvt, &l_kbd);
            break;
        }
    }

    QF_ISR_EXIT();                                  /* QF-specific ISR exit */
}
Example #9
0
/*..........................................................................*/
void interrupt ISR_kbd(void) {
    uint8_t key;
    uint8_t kcr;

    QF_ISR_ENTRY();                                /* QF-specific ISR entry */

    key = inp(0x60);          /* key scan code from the 8042 kbd controller */
    kcr = inp(0x61);                       /* get keyboard control register */
    outp(0x61, (uint8_t)(kcr | 0x80));       /* toggle acknowledge bit high */
    outp(0x61, kcr);                          /* toggle acknowledge bit low */
    if (key == (uint8_t)129) {                          /* ESC key pressed? */
        static QEvt term = {TERMINATE_SIG, 0, 0 };        /* static event */
        QF_PUBLISH(&term, &l_kbd);         /* publish to all interested AOs */
    }

    QF_ISR_EXIT();                                  /* QF-specific ISR exit */
}
Example #10
0
//............................................................................
static void interrupt ISR_kbd(void) {
    static uint8_t ship_pos = GAME_SHIP_Y;

    QF_ISR_ENTRY();

    uint8_t key = inp(0x60);         // key scan code from 8042 kbd controller
    uint8_t kcr = inp(0x61);                  // get keyboard control register
    outp(0x61, (uint8_t)(kcr | 0x80));          // toggle acknowledge bit high
    outp(0x61, kcr);                             // toggle acknowledge bit low

    switch (key) {
        case 200:                                                  // Up-arrow
        case 208: {                                              // Down-arrow
            ObjectPosEvt *ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
            if ((key == (uint8_t)200) && (ship_pos > 0x00)) {
                --ship_pos;
            }
            else if ((key == (uint8_t)208)
                     && (ship_pos < (GAME_SCREEN_HEIGHT - 3))) {
                ++ship_pos;
            }
            ope->x = (uint8_t)GAME_SHIP_X;              // x-position is fixed
            ope->y = (uint8_t)ship_pos;
            AO_Ship->POST(ope, &l_kbd);                    // post to the ship

            Video::printNumAt(24, 24, Video::FGND_YELLOW, ship_pos);
            break;
        }
        case 57: {                                                    // Space
            static uint16_t ntrig = 0;
            static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0 };
            QF::PUBLISH(&fireEvt, &l_kbd);

            Video::printNumAt(47, 24, Video::FGND_YELLOW, ++ntrig);
            break;
        }                                                               // Esc
        case 129: {
            static QEvt const quitEvt = { PLAYER_QUIT_SIG, 0 };
            QF::PUBLISH(&quitEvt, &l_kbd);
            break;
        }
    }

    QF_ISR_EXIT();
}