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

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

?? pc.bak

?? uC/OS-II,The Real-Time Kernel, CORE FUNCTIONS, 80x86/80x88 Specific code (LARGE MEMORY MODEL)
?? BAK
?? 第 1 頁 / 共 2 頁
字號:
    
    PC_VectSet(VECT_DOS_CHAIN, PC_TickISR);                /* Store MS-DOS's tick to chain             */
    
    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             */
        OS_EXIT_CRITICAL();
        PC_VectSet(VECT_TICK, PC_TickISR);                 /* Restore DOS's tick vector                */
        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)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    INT8U      port_data;


    OS_ENTER_CRITICAL();
    port_data  = (INT8U)inp(0x61);                         /* Disable timer #2                         */
    port_data &= 0xFE;
    outp(0x61, port_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);
    port_data |= 0x01;                                     /* Start the timer                          */
    outp(0x61, port_data);
    OS_EXIT_CRITICAL();
}
/*$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)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    INT8U      port_data;
    INT8U      low;
    INT8U      high;
    INT16U     cnts;


    OS_ENTER_CRITICAL();
    port_data  = (INT8U)inp(0x61);                               /* Disable the timer                  */
    port_data &= 0xFE;
    outp(0x61, port_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 */
    OS_EXIT_CRITICAL();
    return ((INT16U)((INT32U)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 21 bytes (includes the NUL) of storage in the return 
*                    string.  The date and time will be formatted as follows:
*
*                        "YYYY-MM-DD  HH:MM:SS"
*
* Returns    : none
*********************************************************************************************************
*/
void PC_GetDateTime (char *s)
{
    struct time now;
    struct date today;


    gettime(&now);
    getdate(&today);
    sprintf(s, "%04d-%02d-%02d  %02d:%02d:%02d",
               today.da_year,
               today.da_mon,
               today.da_day,
               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 = (INT16S)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)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    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;
    }
    OS_ENTER_CRITICAL();
    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                                     */
    OS_EXIT_CRITICAL();
}
/*$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    : The address of the Interrupt handler stored at the desired vector location.
*********************************************************************************************************
*/
void *PC_VectGet (INT8U vect)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    INT16U    *pvect;
    INT16U     off;
    INT16U     seg;
    
    
    pvect = (INT16U *)MK_FP(0x0000, vect * 4);        /* Point into IVT at desired vector location     */
    OS_ENTER_CRITICAL();
    off   = *pvect++;                                 /* Obtain the vector's OFFSET                    */
    seg   = *pvect;                                   /* Obtain the vector's SEGMENT                   */
    OS_EXIT_CRITICAL();
    return (MK_FP(seg, off));
}

/*
*********************************************************************************************************
*                                        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))
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    INT16U    *pvect;
    
    
    pvect    = (INT16U *)MK_FP(0x0000, vect * 4);     /* Point into IVT at desired vector location     */
    OS_ENTER_CRITICAL();
    *pvect++ = (INT16U)FP_OFF(isr);                   /* Store ISR offset                              */
    *pvect   = (INT16U)FP_SEG(isr);                   /* Store ISR segment                             */
    OS_EXIT_CRITICAL();
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲三级免费观看| 91性感美女视频| 国产久卡久卡久卡久卡视频精品| 美女尤物国产一区| 狠狠色2019综合网| 色婷婷亚洲婷婷| 欧美精品一区二区精品网| 欧美不卡一二三| 午夜精品123| 91视频一区二区三区| 欧美r级在线观看| 亚洲综合一区二区三区| 本田岬高潮一区二区三区| 欧美日韩高清一区二区不卡 | 日韩二区在线观看| eeuss影院一区二区三区| 日韩欧美亚洲一区二区| 偷偷要91色婷婷| 91视频.com| 中文字幕一区二区三区在线播放| 亚洲精品成人精品456| 国产综合久久久久久鬼色 | 国产在线精品一区二区夜色| 欧美日韩亚洲高清一区二区| 国产精品福利一区二区三区| 国产美女主播视频一区| 日韩欧美一区二区免费| 日本不卡视频在线| 91麻豆精品国产自产在线观看一区| 中文字幕中文在线不卡住| 韩国欧美一区二区| 久久久综合精品| 国产成人99久久亚洲综合精品| 在线成人小视频| 裸体一区二区三区| 久久色视频免费观看| 久久99久久99精品免视看婷婷 | 国产欧美日韩卡一| 国产精品亚洲第一区在线暖暖韩国| 精品人在线二区三区| 国产精品自拍网站| 亚洲gay无套男同| 久久一日本道色综合| 成人黄色av电影| 亚洲午夜在线视频| 国产欧美精品一区| 在线观看日韩电影| 国产成人免费视频一区| 亚洲成人高清在线| 国产精品私人自拍| 日韩美女视频一区二区在线观看| 99久久综合国产精品| 午夜av区久久| 亚洲欧美激情视频在线观看一区二区三区 | av午夜一区麻豆| 秋霞成人午夜伦在线观看| 亚洲一区在线播放| 亚洲国产一二三| 亚洲精品第1页| 亚洲一区在线观看免费| 亚洲免费av观看| 尤物视频一区二区| 悠悠色在线精品| 国产精品传媒在线| 国产精品不卡在线| 中文字幕av在线一区二区三区| 欧美午夜不卡视频| 日韩一区二区免费视频| 欧美日本一道本| 欧美日韩精品欧美日韩精品 | 日韩无一区二区| 精品国产一区二区在线观看| 久久亚洲综合色| 视频一区欧美日韩| 国内精品伊人久久久久av影院 | 日韩一区二区高清| 中文字幕巨乱亚洲| 久久99精品久久只有精品| 91精品国产一区二区人妖| 亚洲视频每日更新| 一区二区三区日本| 亚洲成人精品影院| 激情偷乱视频一区二区三区| 久久国内精品自在自线400部| 国产在线精品一区二区| 波多野结衣视频一区| 欧美性猛交一区二区三区精品| 欧美人牲a欧美精品| 久久久五月婷婷| 一区二区三区中文字幕| 麻豆精品一区二区av白丝在线| 国产白丝网站精品污在线入口| 99久久国产综合精品麻豆| 日韩欧美在线网站| 亚洲美女免费视频| 国产一区二区三区免费在线观看| 色妹子一区二区| 国产精品视频yy9299一区| 欧美三级电影网站| 久久你懂得1024| 94-欧美-setu| 亚洲图片欧美综合| 精品人伦一区二区色婷婷| 国产成人一区二区精品非洲| 国产亚洲成aⅴ人片在线观看| 国产成人亚洲综合色影视| 亚洲欧洲国产专区| 色菇凉天天综合网| 婷婷丁香久久五月婷婷| 精品国一区二区三区| 成人91在线观看| 丝袜a∨在线一区二区三区不卡 | 久久精品国产亚洲5555| 久久久精品日韩欧美| 91视频免费观看| 韩国一区二区在线观看| 亚洲男女一区二区三区| 色噜噜狠狠色综合中国| 久久99精品久久久久| 亚洲激情男女视频| 日本一区二区三级电影在线观看| 色偷偷成人一区二区三区91| 国产高清不卡一区| 美女免费视频一区二区| 亚洲欧美在线另类| 日韩一区二区高清| 亚洲国产精品国自产拍av| 精品久久人人做人人爰| 欧美精品三级在线观看| 91麻豆精品91久久久久久清纯| 色香蕉成人二区免费| 欧美熟乱第一页| 7777精品伊人久久久大香线蕉 | 91理论电影在线观看| 久久不见久久见免费视频1 | 久久精品一区二区三区四区| 欧美性猛交xxxxxx富婆| 91丨九色丨黑人外教| 成人自拍视频在线| 国产成人精品影视| 久久97超碰色| 国产精品综合久久| 国内精品国产成人国产三级粉色 | 日韩欧美视频一区| 欧美一区二区三区喷汁尤物| 在线看日韩精品电影| www.爱久久.com| 色偷偷久久一区二区三区| 欧美亚洲一区二区在线观看| 91日韩精品一区| 欧美精品一二三| 精品剧情在线观看| 日韩免费高清视频| 精品国产乱码久久久久久免费| 26uuu另类欧美亚洲曰本| 欧美激情一区二区三区| 国产亚洲精品aa午夜观看| 亚洲国产精品精华液2区45| 国产精品久久久久影院老司| 亚洲欧美色综合| 精品系列免费在线观看| 欧美自拍偷拍午夜视频| 5566中文字幕一区二区电影| 久久精品亚洲乱码伦伦中文| 亚洲自拍偷拍麻豆| 久久99精品一区二区三区| 97se亚洲国产综合在线| 日韩欧美在线影院| 一区二区在线看| 蜜乳av一区二区三区| 欧美色区777第一页| 国产精品免费丝袜| 国产精品综合网| 337p日本欧洲亚洲大胆色噜噜| 日本不卡视频一二三区| 色婷婷av久久久久久久| 中文字幕一区在线观看视频| 国产一区二区三区不卡在线观看| 欧美福利一区二区| 亚洲va在线va天堂| 欧美无乱码久久久免费午夜一区| 亚洲色图制服丝袜| 色欧美乱欧美15图片| 亚洲成人免费在线观看| 欧美在线播放高清精品| 一级精品视频在线观看宜春院 | 丝袜美腿成人在线| 色婷婷综合久久久| 伊人开心综合网| 成人精品一区二区三区中文字幕| 欧美日韩成人综合在线一区二区| 久久成人免费网| 国产日韩精品一区二区三区 | 亚洲一区二区美女| 欧美电影在哪看比较好| 亚洲成人av在线电影| 91蝌蚪porny九色| 一区二区三区四区不卡在线 | 亚洲福利视频三区| 欧美性生活影院|