亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pc.c

?? 在Keil C環境下運行的uCOS-
?? C
?? 第 1 頁 / 共 2 頁
字號:
void PC_DispStr (INT8U x, INT8U y, INT8U *s, INT8U color) KCREENTRANT
{
    INT8U  far *pscr;
    INT16U      offset;


    offset  = (INT16U)y * DISP_MAX_X * 2 + (INT16U)x * 2;   /* Calculate position of 1st character     */
    pscr    = MK_FP(DISP_BASE, offset);
    while (*s) {
        *pscr++ = *s++;                                     /* Put character in video RAM              */
        *pscr++ = color;                                    /* Put video attribute in video RAM        */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                             RETURN TO DOS
*
* Description : This functions returns control back to DOS by doing a 'long jump' back to the saved
*               location stored in 'PC_JumpBuf'.  The saved location was established by the function
*               'PC_DOSSaveReturn()'.  After execution of the long jump, execution will resume at the 
*               line following the 'set jump' back in 'PC_DOSSaveReturn()'.  Setting the flag 
*               'PC_ExitFlag' to TRUE ensures that the 'if' statement in 'PC_DOSSaveReturn()' executes.
*
* Arguments   : None
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DOSReturn (void) KCREENTRANT
{
    PC_ExitFlag = TRUE;                                    /* Indicate we are returning to DOS         */
    longjmp(PC_JumpBuf, 1);                                /* Jump back to saved environment           */
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        SAVE DOS RETURN LOCATION
*
* Description : This function saves the location of where we are in DOS so that it can be recovered.
*               This allows us to abort multitasking under uC/OS-II and return back to DOS as if we had
*               never left.  When this function is called by 'main()', it sets 'PC_ExitFlag' to FALSE
*               so that we don't take the 'if' branch.  Instead, the CPU registers are saved in the
*               long jump buffer 'PC_JumpBuf' and we simply return to the caller.  If a 'long jump' is
*               performed using the jump buffer then, execution would resume at the 'if' statement and
*               this time, if 'PC_ExitFlag' is set to TRUE then we would execute the 'if' statements and
*               restore the DOS environment.
*
* Arguments   : None
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DOSSaveReturn (void) KCREENTRANT
{
    PC_ExitFlag  = FALSE;                                  /* Indicate that we are not exiting yet!    */
    OSTickDOSCtr =     1;                                  /* Initialize the DOS tick counter          */
    PC_TickISR   = PC_VectGet(VECT_TICK);                  /* Get MS-DOS's tick vector                 */
    
    OS_ENTER_CRITICAL();
    PC_VectSet(VECT_DOS_CHAIN, PC_TickISR);                /* Store MS-DOS's tick to chain             */
    OS_EXIT_CRITICAL();
    
    setjmp(PC_JumpBuf);                                    /* Capture where we are in DOS              */
    if (PC_ExitFlag == TRUE) {                             /* See if we are exiting back to DOS        */
        OS_ENTER_CRITICAL();
        PC_SetTickRate(18);                                /* Restore tick rate to 18.2 Hz             */
        PC_VectSet(VECT_TICK, PC_TickISR);                 /* Restore DOS's tick vector                */
        OS_EXIT_CRITICAL();
        PC_DispClrScr(DISP_FGND_WHITE + DISP_BGND_BLACK);  /* Clear the display                        */
        exit(0);                                           /* Return to DOS                            */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                       ELAPSED TIME INITIALIZATION
*
* Description : This function initialize the elapsed time module by determining how long the START and
*               STOP functions take to execute.  In other words, this function calibrates this module
*               to account for the processing time of the START and STOP functions.
*
* Arguments   : None.
*
* Returns     : None.
*********************************************************************************************************
*/
void PC_ElapsedInit(void) KCREENTRANT
{
    PC_ElapsedOverhead = 0;
    PC_ElapsedStart();
    PC_ElapsedOverhead = PC_ElapsedStop();
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                         INITIALIZE PC'S TIMER #2
*
* Description : This function initialize the PC's Timer #2 to be used to measure the time between events.
*               Timer #2 will be running when the function returns.
*
* Arguments   : None.
*
* Returns     : None.
*********************************************************************************************************
*/
void PC_ElapsedStart(void) KCREENTRANT
{
    INT8U vdata;

    vdata  = (INT8U)inp(0x61);                              /* Disable timer #2                         */
    vdata &= 0xFE;
    outp(0x61, vdata);
    outp(TICK_T0_8254_CWR,  TICK_T0_8254_CTR2_MODE0);      /* Program timer #2 for Mode 0              */
    outp(TICK_T0_8254_CTR2, 0xFF);
    outp(TICK_T0_8254_CTR2, 0xFF);
    vdata |= 0x01;                                          /* Start the timer                          */
    outp(0x61, vdata);
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                 STOP THE PC'S TIMER #2 AND GET ELAPSED TIME
*
* Description : This function stops the PC's Timer #2, obtains the elapsed counts from when it was
*               started and converts the elapsed counts to micro-seconds.
*
* Arguments   : None.
*
* Returns     : The number of micro-seconds since the timer was last started.
*
* Notes       : - The returned time accounts for the processing time of the START and STOP functions.
*               - 54926 represents 54926S-16 or, 0.838097 which is used to convert timer counts to
*                 micro-seconds.  The clock source for the PC's timer #2 is 1.19318 MHz (or 0.838097 uS)
*********************************************************************************************************
*/
INT16U PC_ElapsedStop(void) KCREENTRANT
{
    INT8U  vdata;
    INT8U  low;
    INT8U  high;
    INT16U cnts;


    vdata  = inp(0x61);                                           /* Disable the timer                  */
    vdata &= 0xFE;
    outp(0x61, vdata);
    outp(TICK_T0_8254_CWR, TICK_T0_8254_CTR2_LATCH);             /* Latch the timer value              */
    low  = inp(TICK_T0_8254_CTR2);
    high = inp(TICK_T0_8254_CTR2);
    cnts = (INT16U)0xFFFF - (((INT16U)high << 8) + (INT16U)low); /* Compute time it took for operation */
    return ((INT16U)((ULONG)cnts * 54926L >> 16) - PC_ElapsedOverhead);
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                       GET THE CURRENT DATE AND TIME
*
* Description: This function obtains the current date and time from the PC.
*
* Arguments  : s     is a pointer to where the ASCII string of the current date and time will be stored.
*                    You must allocate at least 19 bytes (includes the NUL) of storage in the return 
*                    string.
*
* Returns    : none
*********************************************************************************************************
*/
void PC_GetDateTime (char *s) KCREENTRANT
{
    struct time now;
    struct date today;


    gettime(&now);
    getdate(&today);
    sprintf(s, "%02bd-%02bd-%02bd  %02bd:%02bd:%02bd",
               today.da_mon,
               today.da_day,
               today.da_year,
               now.ti_hour,
               now.ti_min,
               now.ti_sec);
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        CHECK AND GET KEYBOARD KEY
*
* Description: This function checks to see if a key has been pressed at the keyboard and returns TRUE if
*              so.  Also, if a key is pressed, the key is read and copied where the argument is pointing
*              to.
*
* Arguments  : c     is a pointer to where the read key will be stored.
*
* Returns    : TRUE  if a key was pressed
*              FALSE otherwise
*********************************************************************************************************
*/
BOOLEAN PC_GetKey (INT16S *c) KCREENTRANT
{
    if (kbhit()) {                                         /* See if a key has been pressed            */
        *c = getch();                                      /* Get key pressed                          */
        return (TRUE);
    } else {
        *c = 0x00;                                         /* No key pressed                           */
        return (FALSE);
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                      SET THE PC'S TICK FREQUENCY
*
* Description: This function is called to change the tick rate of a PC.
*
* Arguments  : freq      is the desired frequency of the ticker (in Hz)
*
* Returns    : none
*
* Notes      : 1) The magic number 2386360 is actually twice the input frequency of the 8254 chip which
*                 is always 1.193180 MHz.
*              2) The equation computes the counts needed to load into the 8254.  The strange equation
*                 is actually used to round the number using integer arithmetic.  This is equivalent to
*                 the floating point equation:
*
*                             1193180.0 Hz
*                     count = ------------ + 0.5
*                                 freq
*********************************************************************************************************
*/
void PC_SetTickRate (INT16U freq) KCREENTRANT
{
    INT16U count;


    if (freq == 18) {                            /* See if we need to restore the DOS frequency        */
        count = 0;
    } else if (freq > 0) {                        
                                                 /* Compute 8254 counts for desired frequency and ...  */
                                                 /* ... round to nearest count                         */
        count = (INT16U)(((INT32U)2386360L / freq + 1) >> 1); 
    } else {
        count = 0;
    }
    outp(TICK_T0_8254_CWR,  TICK_T0_8254_CTR0_MODE3); /* Load the 8254 with desired frequency          */  
    outp(TICK_T0_8254_CTR0, count & 0xFF);            /* Low  byte                                     */
    outp(TICK_T0_8254_CTR0, (count >> 8) & 0xFF);     /* High byte                                     */
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        OBTAIN INTERRUPT VECTOR
*
* Description: This function reads the pointer stored at the specified vector.
*
* Arguments  : vect  is the desired interrupt vector number, a number between 0 and 255.
*
* Returns    : none
*********************************************************************************************************
*/
void *PC_VectGet (INT8U vect) KCREENTRANT
{
    return (getvect(vect));
}

/*
*********************************************************************************************************
*                                        INSTALL INTERRUPT VECTOR
*
* Description: This function sets an interrupt vector in the interrupt vector table.
*
* Arguments  : vect  is the desired interrupt vector number, a number between 0 and 255.
*              isr   is a pointer to a function to execute when the interrupt or exception occurs.
*
* Returns    : none
*********************************************************************************************************
*/
void PC_VectSet (INT8U vect, void (*isr)(void)) KCREENTRANT
{
    setvect(vect, (void interrupt (*)(void))isr);
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产高清一区二区三区 | 久久99久久99| 成人免费观看男女羞羞视频| 欧洲在线/亚洲| 中文字幕乱码久久午夜不卡 | 亚洲制服欧美中文字幕中文字幕| 激情综合色综合久久综合| 91在线高清观看| 26uuu精品一区二区| 日韩av在线免费观看不卡| av电影天堂一区二区在线观看| 欧美妇女性影城| 亚洲一卡二卡三卡四卡| 91精品国产丝袜白色高跟鞋| 136国产福利精品导航| 国产高清不卡一区| 久久新电视剧免费观看| 男人操女人的视频在线观看欧美| 日本精品视频一区二区| 亚洲同性同志一二三专区| 高清不卡一二三区| 精品久久久久久久久久久久久久久久久 | 丰满白嫩尤物一区二区| 欧美精品一区二区三区很污很色的| 婷婷国产在线综合| 精品视频一区 二区 三区| 亚洲日本免费电影| 色综合视频在线观看| 亚洲蜜臀av乱码久久精品蜜桃| 成人开心网精品视频| 欧美激情一区二区三区全黄| 国产.精品.日韩.另类.中文.在线.播放| 精品国免费一区二区三区| 国产主播一区二区| 国产偷国产偷精品高清尤物| 成人亚洲精品久久久久软件| 亚洲国产成人在线| 91看片淫黄大片一级在线观看| 亚洲欧美综合在线精品| 欧美亚洲国产一区二区三区va | 综合婷婷亚洲小说| 欧美在线不卡一区| 视频在线观看一区二区三区| 日韩欧美一区二区不卡| 国产精品一区二区无线| 国产精品久久久久影院亚瑟 | 亚洲成a人v欧美综合天堂下载| 欧美日本在线观看| 经典三级视频一区| 国产精品久久久久久久久免费桃花 | 97se亚洲国产综合自在线观| 综合欧美亚洲日本| 欧美日韩久久久| 国产一区二区三区精品视频| 国产精品视频你懂的| 欧美性生活一区| 久久成人av少妇免费| 日本一区二区成人| 欧美视频一区在线| 激情文学综合网| 国产精品美女一区二区| 欧美优质美女网站| 国产在线播放一区| 中文av一区二区| 欧美精品 国产精品| 高清不卡在线观看av| 亚洲韩国一区二区三区| 久久婷婷久久一区二区三区| 色屁屁一区二区| 国产一区二区三区在线观看精品| 1000精品久久久久久久久| 7777精品伊人久久久大香线蕉的 | 丝袜美腿亚洲一区二区图片| 久久久噜噜噜久噜久久综合| 91黄视频在线| 国产精品亚洲成人| 丝袜a∨在线一区二区三区不卡 | 91丝袜呻吟高潮美腿白嫩在线观看| 天天综合日日夜夜精品| 国产精品毛片a∨一区二区三区| 欧美色图激情小说| 99久久精品免费| 国产露脸91国语对白| 日韩在线a电影| 一区二区三区中文在线| 中文av一区二区| 久久久精品免费免费| 欧美疯狂做受xxxx富婆| 91成人看片片| 99久久精品免费看| 国产91对白在线观看九色| 精品中文字幕一区二区小辣椒| 亚洲午夜精品网| 亚洲精品亚洲人成人网在线播放| 久久影视一区二区| 日韩精品一区二区三区在线播放| 欧美在线短视频| 91福利在线免费观看| 色伊人久久综合中文字幕| 成人网页在线观看| 国产一区二区三区蝌蚪| 日本最新不卡在线| 日日夜夜精品免费视频| 日韩一区精品视频| 一区二区三区中文免费| 亚洲精品欧美二区三区中文字幕| 国产精品久久影院| 中文字幕亚洲欧美在线不卡| 中文字幕av资源一区| 国产蜜臀97一区二区三区| 久久久亚洲国产美女国产盗摄| 日韩免费在线观看| 精品国产乱码久久久久久老虎 | 亚洲自拍偷拍av| 亚洲一卡二卡三卡四卡五卡| 亚洲国产精品一区二区www | 中文字幕综合网| 国产精品进线69影院| 国产精品你懂的| 亚洲欧美一区二区三区极速播放| 亚洲色图都市小说| 性久久久久久久| 人禽交欧美网站| 韩国女主播成人在线观看| 久草这里只有精品视频| 黄色资源网久久资源365| 国产一区二区h| 99久精品国产| 精品视频在线看| 精品日韩在线观看| 中文字幕免费不卡| 亚洲亚洲人成综合网络| 日韩在线a电影| 国产高清不卡二三区| 91一区在线观看| 欧美精品v国产精品v日韩精品| 日韩午夜在线影院| 国产欧美一区视频| 亚洲一区二三区| 韩国女主播成人在线观看| 99精品视频一区二区| 91精品国产色综合久久ai换脸| 久久你懂得1024| 亚洲福利一区二区三区| 久久精品99久久久| 99在线热播精品免费| 欧美裸体bbwbbwbbw| 久久久99精品久久| 亚洲丰满少妇videoshd| 国产美女娇喘av呻吟久久| 色88888久久久久久影院野外| 日韩久久免费av| 一区二区三区中文字幕在线观看| 久久精品国产免费看久久精品| 高清在线成人网| 日韩区在线观看| 一区二区三区四区视频精品免费 | 偷偷要91色婷婷| 丁香亚洲综合激情啪啪综合| 欧美三区免费完整视频在线观看| 久久久久久久久久久久电影| 亚洲午夜久久久| 成人综合婷婷国产精品久久| 欧美一二区视频| 亚洲女爱视频在线| 丰满亚洲少妇av| 精品国产乱码久久久久久免费| 亚洲一级二级三级在线免费观看| 国产成人亚洲综合a∨婷婷图片| 91麻豆精品国产91久久久更新时间 | 国产成人精品三级麻豆| 欧美一区二区三区人| 亚洲免费av观看| 成人白浆超碰人人人人| xfplay精品久久| 免费看日韩a级影片| 91免费看片在线观看| 国产农村妇女毛片精品久久麻豆| 日韩在线卡一卡二| 欧美性感一区二区三区| 亚洲人精品午夜| 成人sese在线| 国产精品蜜臀在线观看| 国产成人精品1024| 精品美女一区二区三区| 日本不卡中文字幕| 欧美高清dvd| 日本在线播放一区二区三区| 欧美精品免费视频| 风间由美一区二区av101| 国产亚洲精品超碰| 激情欧美日韩一区二区| 久久嫩草精品久久久久| 激情五月激情综合网| 欧美mv日韩mv国产网站app| 日本美女一区二区三区视频| 欧美一卡二卡在线| 日韩精品一级二级 | 麻豆国产精品官网| 精品国产第一区二区三区观看体验|