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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? pc.c

?? UCOS-2.rar
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
{
//change by cmj
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    


//    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                 */
    
//    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.
*********************************************************************************************************
*/
//change by cmj
        void PC_ElapsedStart(void)
{
    PC_ElapsedOverhead = T0TC;
}

//void PC_ElapsedStart(void)
//{
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    
//    INT8U      data;


//    OS_ENTER_CRITICAL();
//    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);
//    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)
*********************************************************************************************************
*/
//change by cmj
        INT16U PC_ElapsedStop(void)
{
    return ((T0TC - PC_ElapsedOverhead) / (Fpclk / 1000000));
}

//INT16U PC_ElapsedStop(void)
//{
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    
//    INT8U      data;
//    INT8U      low;
//    INT8U      high;
//    INT16U     cnts;


//    OS_ENTER_CRITICAL();
//    data  = (INT8U)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 */
//    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
*********************************************************************************************************
*/
//change by cmj
        void PC_GetDateTime (char *s)
{
    INT32U da_year,da_mon,da_day,ti_hour,ti_min,ti_sec;
    

    ti_sec = SEC;
    ti_min = MIN;
    ti_hour = HOUR;
    da_day = DOM;
    da_mon = MONTH;
    da_year = YEAR;

    sprintf(s, "%04d-%02d-%02d  %02d:%02d:%02d",
               da_year,da_mon,da_day,ti_hour,ti_min,ti_sec);
}

//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
*********************************************************************************************************
*/
//change by cmj
    BOOLEAN PC_GetKey (INT16S *c)
{
    if ((U0LSR & 0x00000001) != 0)
    {
        *c = U0RBR;
        return (TRUE);
    }
    else
    {
        *c = 0x00;
        return (FALSE);
    }
}

//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
*********************************************************************************************************
*/
//del by cmj
//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.
*********************************************************************************************************
*/
//del by cmj
//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
*********************************************************************************************************
*/
//del by cmj
//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();
//}


//add by cmj
        INT8U random(INT8U seed)
{
    uint16 temp;

    temp = rand();
    temp = temp % seed;
	return temp;
}

/*********************************************************************************************************
**                            End Of File
********************************************************************************************************/

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美疯狂做受xxxx富婆| 欧美性色欧美a在线播放| 亚洲乱码国产乱码精品精的特点| 91久久精品网| 日韩欧美的一区| 成人aa视频在线观看| 一区二区久久久久| 日韩欧美另类在线| 成人av免费观看| 午夜电影一区二区三区| 久久久久久久综合日本| 欧日韩精品视频| 国产一区二区在线观看视频| 亚洲精品五月天| xf在线a精品一区二区视频网站| 国产精品成人一区二区三区夜夜夜 | 国产一区二区三区免费在线观看| 亚洲人精品一区| 久久久www免费人成精品| 欧亚洲嫩模精品一区三区| 国产成人午夜高潮毛片| 美女脱光内衣内裤视频久久网站| 国产精品久久久久久久久免费桃花 | 欧美日韩国产高清一区| 国产传媒久久文化传媒| 日本aⅴ免费视频一区二区三区 | 欧美一区二区福利视频| 一本在线高清不卡dvd| 久久久久久久免费视频了| 欧美一区二区不卡视频| 亚洲桃色在线一区| 国内外成人在线| 午夜久久久影院| 亚洲精品菠萝久久久久久久| 久久久久久久久伊人| 日韩一区二区在线观看视频 | 欧美一卡2卡三卡4卡5免费| 日本高清不卡视频| 91在线精品一区二区三区| 激情五月激情综合网| 久久 天天综合| 激情综合色丁香一区二区| 日韩不卡在线观看日韩不卡视频| 视频一区欧美日韩| 捆绑变态av一区二区三区| 久久 天天综合| 国产精品影音先锋| 高清不卡一二三区| 成人国产视频在线观看| 91小视频免费观看| 精品视频一区二区不卡| 欧美一区二区观看视频| 26uuu色噜噜精品一区| 国产欧美精品在线观看| 国产精品第13页| 亚洲国产aⅴ成人精品无吗| 日韩在线a电影| 国产99一区视频免费| 色又黄又爽网站www久久| 欧美伊人精品成人久久综合97| 欧美理论片在线| 久久久五月婷婷| 亚洲欧洲99久久| 性做久久久久久久久| 免费不卡在线视频| 成人免费视频免费观看| 欧美无砖砖区免费| 国产三级久久久| 亚洲电影一区二区| 国产精品18久久久久久vr| 99久久免费视频.com| 蜜桃一区二区三区在线观看| 国产成人免费高清| 欧美剧情电影在线观看完整版免费励志电影 | 日韩三级伦理片妻子的秘密按摩| 欧美激情一区二区三区四区| 亚洲国产中文字幕在线视频综合| 久久爱另类一区二区小说| 一道本成人在线| 中文字幕精品在线不卡| 日本不卡一二三区黄网| 91亚洲精品久久久蜜桃网站| 久久亚洲综合色一区二区三区| 亚洲成人先锋电影| 不卡一区二区在线| 日韩欧美中文字幕一区| 一区二区三区四区不卡视频| 国产成人一区在线| 欧美一卡在线观看| 亚洲成a人片在线不卡一二三区| 丰满岳乱妇一区二区三区| 欧美女孩性生活视频| 国产精品国产三级国产普通话蜜臀| 奇米四色…亚洲| 欧美三级乱人伦电影| 一区二区三区av电影| 99视频精品在线| 亚洲国产精品成人久久综合一区| 蜜桃视频在线观看一区| 欧美一区二区三区在线观看| 天天av天天翘天天综合网| 欧洲一区二区av| 天天亚洲美女在线视频| 欧美在线视频日韩| 亚洲午夜在线电影| 欧美性三三影院| 视频在线观看91| 91精品国产91久久久久久最新毛片| 亚洲h动漫在线| 日韩美女主播在线视频一区二区三区| 日韩激情一二三区| 日本aⅴ精品一区二区三区 | 91精品国产综合久久婷婷香蕉| 亚洲成人动漫精品| 91精品中文字幕一区二区三区| 免费在线看成人av| 久久久亚洲精品石原莉奈| 成人黄色网址在线观看| 亚洲欧美另类综合偷拍| 欧美二区三区91| 国产乱色国产精品免费视频| 中文字幕免费不卡在线| 99久久精品免费看国产 | 日韩欧美高清在线| 99re这里只有精品视频首页| 亚洲一区二区视频在线观看| 日韩欧美另类在线| 色伊人久久综合中文字幕| 日本大胆欧美人术艺术动态| 欧美激情一区三区| 在线播放国产精品二区一二区四区| 美女久久久精品| 亚洲精品免费看| 精品动漫一区二区三区在线观看| aaa国产一区| 久久草av在线| 亚洲v中文字幕| 亚洲视频一区在线| 久久久久成人黄色影片| 欧美日韩亚洲丝袜制服| 99久久伊人久久99| 精彩视频一区二区| 亚洲成人资源在线| 中文字幕日本乱码精品影院| 欧美精品一区男女天堂| 欧美男生操女生| 精品久久久久久最新网址| 欧美日韩精品欧美日韩精品一综合| 国产乱子轮精品视频| 秋霞午夜av一区二区三区| 一区二区三区高清不卡| 精品国产91乱码一区二区三区| 国产经典欧美精品| 蜜臀精品一区二区三区在线观看| 亚洲天堂免费看| 中文字幕国产一区| 久久综合色之久久综合| 日韩精品在线一区| 宅男噜噜噜66一区二区66| 色哟哟一区二区| 在线观看区一区二| 91小视频在线观看| 欧洲人成人精品| 日本乱人伦aⅴ精品| 欧美亚洲国产一区二区三区va | 亚洲综合色网站| 夜夜精品视频一区二区 | 日韩激情av在线| 蜜桃传媒麻豆第一区在线观看| 视频一区国产视频| 青青草国产精品97视觉盛宴| 日韩综合小视频| 久草这里只有精品视频| 国内精品在线播放| 国产成人av一区二区| 成人午夜在线视频| 在线免费不卡视频| 欧美一区二区在线不卡| 日韩精品一区二区三区老鸭窝| 精品三级在线看| 中文无字幕一区二区三区| 亚洲蜜桃精久久久久久久| 亚洲h在线观看| 国内外成人在线视频| 99久久免费精品| 欧美一区二区在线免费观看| 国产色爱av资源综合区| 亚洲人一二三区| 免费观看在线综合| heyzo一本久久综合| 欧美久久久久久蜜桃| 亚洲国产成人在线| 日韩激情一区二区| 91在线porny国产在线看| 日韩美女在线视频| 亚洲国产一二三| www.性欧美| 欧美精品一区二区蜜臀亚洲| 亚洲图片欧美综合| 91丨九色丨黑人外教|