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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pc.c

?? ucos很好的學(xué)習(xí)代碼
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
    
    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)
{
    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)
{
    INT8U data;


    data  = (INT8U)inp(0x61);                              /* Disable timer #2                         */
    data &= 0xFE;
    outp(0x61, data);
    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);
    data |= 0x01;                                          /* Start the timer                          */
    outp(0x61, data);
}
/*$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)
{
    INT8U  data;
    INT8U  low;
    INT8U  high;
    INT16U cnts;


    data  = inp(0x61);                                           /* Disable the timer                  */
    data &= 0xFE;
    outp(0x61, data);
    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)
{
    struct time now;
    struct date today;


    gettime(&now);
    getdate(&today);
    sprintf(s, "%02d-%02d-%02d  %02d:%02d:%02d",
               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)
{
    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)
{
    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)
{
    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))
{
    setvect(vect, (void interrupt (*)(void))isr);
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区二区久久婷婷| 国产一区不卡在线| 99re热视频这里只精品| 精品国产一区二区三区久久久蜜月 | 亚洲天堂成人在线观看| 国产精品自产自拍| 精品久久久久香蕉网| 日本va欧美va精品| 日韩三级在线免费观看| 日本91福利区| 日韩三级免费观看| 毛片不卡一区二区| 欧美zozo另类异族| 国产成人在线视频网站| 国产午夜精品一区二区三区视频| 美国十次综合导航| 久久精品视频网| 国产a精品视频| 国产精品久久久久久久久动漫| 从欧美一区二区三区| 国产精品三级视频| 在线观看www91| 视频一区二区欧美| 日韩欧美视频一区| 国产mv日韩mv欧美| 亚洲男人的天堂av| 欧美欧美午夜aⅴ在线观看| 蜜桃一区二区三区在线观看| 日韩一区二区免费高清| 国产精品一二三四区| 综合激情成人伊人| 欧美精品久久99| 另类欧美日韩国产在线| 欧美国产激情二区三区| a在线欧美一区| 五月婷婷综合在线| 久久天堂av综合合色蜜桃网| 成人精品小蝌蚪| 午夜成人免费电影| 久久丝袜美腿综合| 欧美在线观看视频在线| 欧美aaa在线| 中文字幕免费不卡| 欧美日韩国产系列| 国产福利精品一区| 亚洲国产欧美在线| 久久色在线视频| 欧美午夜宅男影院| 国产精品亚洲一区二区三区在线| 亚洲三级久久久| 欧美大度的电影原声| 国产精品综合久久| 一区二区三区高清不卡| 欧美精品一区二区三| 色哟哟国产精品免费观看| 青青草原综合久久大伊人精品| 欧美高清一级片在线| 国产精品香蕉一区二区三区| 依依成人综合视频| 国产日韩欧美电影| 91福利视频网站| 国产成人av一区二区三区在线 | av不卡免费电影| 日韩福利视频网| 综合婷婷亚洲小说| 久久精品男人天堂av| 69堂精品视频| 在线免费观看不卡av| 国产盗摄视频一区二区三区| 首页综合国产亚洲丝袜| 亚洲乱码国产乱码精品精小说| 精品日韩欧美一区二区| 欧美日韩激情一区| 色狠狠综合天天综合综合| 国产曰批免费观看久久久| 亚洲v中文字幕| 综合久久一区二区三区| 日本一区二区成人在线| 欧美一区二区久久| 欧美日韩国产首页在线观看| 91色porny| 成人av网站免费观看| 国产九九视频一区二区三区| 免费成人av资源网| 肉肉av福利一精品导航| 亚洲va韩国va欧美va| 亚洲欧美偷拍三级| 亚洲欧洲精品一区二区三区| 亚洲国产精品t66y| 国产精品私人自拍| 国产精品网友自拍| 国产欧美日韩视频一区二区| 久久久久久97三级| 久久久久国产精品厨房| 久久美女高清视频 | 91精品国产美女浴室洗澡无遮挡| 91国内精品野花午夜精品| 91国模大尺度私拍在线视频| 91国产丝袜在线播放| 欧美丝袜丝交足nylons图片| 色婷婷国产精品| 91美女片黄在线| 欧洲精品视频在线观看| 欧美日韩一区二区在线视频| 在线看国产日韩| 欧美怡红院视频| 欧美日韩精品一区二区| 3d成人动漫网站| 欧美不卡视频一区| 久久亚洲综合色一区二区三区| 久久麻豆一区二区| 国产精品伦一区二区三级视频| 国产精品网曝门| 一区二区三区在线观看网站| 亚洲成人久久影院| 亚洲高清免费一级二级三级| 免费在线观看日韩欧美| 国产丶欧美丶日本不卡视频| 99国产精品国产精品久久| 国产成人在线免费观看| 91天堂素人约啪| 欧美日韩视频在线第一区 | 69av一区二区三区| 日韩一级黄色大片| 国产人伦精品一区二区| 一区二区三区欧美在线观看| 亚洲v精品v日韩v欧美v专区| 久久99国产精品尤物| 成人av动漫网站| 欧美精品乱码久久久久久| 久久久久久**毛片大全| 亚洲精品成人天堂一二三| 首页综合国产亚洲丝袜| 高清国产一区二区三区| 欧美日韩在线一区二区| 国产亚洲欧美一区在线观看| 一级精品视频在线观看宜春院| 三级在线观看一区二区 | 欧洲色大大久久| 精品成人免费观看| 樱花草国产18久久久久| 韩国视频一区二区| 欧美视频一区在线观看| 久久久久久黄色| 日韩av电影免费观看高清完整版 | 91精品在线免费观看| 中文字幕 久热精品 视频在线 | 天堂午夜影视日韩欧美一区二区| 国产一区日韩二区欧美三区| 91猫先生在线| 久久一区二区三区四区| 樱花草国产18久久久久| 激情伊人五月天久久综合| 色噜噜夜夜夜综合网| 久久日韩精品一区二区五区| 亚洲二区视频在线| 成人性色生活片免费看爆迷你毛片| 91精品国产91综合久久蜜臀| 中文字幕一区二区在线观看| 精久久久久久久久久久| 欧美性欧美巨大黑白大战| 国产三级一区二区三区| 日韩二区三区在线观看| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美在线短视频| 欧美极品aⅴ影院| 极品瑜伽女神91| 3d动漫精品啪啪一区二区竹菊| 亚洲精品成人在线| 99精品久久只有精品| 欧美国产精品一区| 国产精品中文字幕日韩精品| 欧美一区二区视频在线观看 | 欧美三日本三级三级在线播放| 久久久精品综合| 免费成人在线观看视频| 7777精品久久久大香线蕉| 亚洲高清中文字幕| 欧美性生活久久| 一个色综合网站| 色视频欧美一区二区三区| 国产精品久久三区| 成人av网站在线观看免费| 国产精品美女久久久久高潮| 国产白丝网站精品污在线入口| 欧美α欧美αv大片| 久久99精品久久久久婷婷| 日韩一区二区三区在线视频| 七七婷婷婷婷精品国产| 欧美大片一区二区| 久久99精品久久久久久久久久久久| 欧美一卡2卡3卡4卡| 免费看精品久久片| 精品捆绑美女sm三区| 国产在线不卡一区| 国产精品色噜噜| 在线观看国产精品网站| 婷婷六月综合亚洲| 精品国产亚洲在线| 高清国产午夜精品久久久久久|