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

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

?? pc.c

?? UCOS-2.rar
?? C
?? 第 1 頁 / 共 2 頁
字號:
{
//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
********************************************************************************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区二区| 国产91高潮流白浆在线麻豆| 黄色日韩网站视频| 91原创在线视频| 精品国产一区二区三区久久久蜜月| 国产精品久久久久一区二区三区共| 亚洲1区2区3区视频| 国产自产视频一区二区三区| 99re热视频精品| 久久综合久久综合久久| 日韩国产高清在线| 91电影在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 免费人成在线不卡| 成人精品鲁一区一区二区| 91麻豆精品久久久久蜜臀| 成人免费一区二区三区视频| 国产精品资源站在线| 精品美女被调教视频大全网站| 亚洲国产aⅴ成人精品无吗| eeuss鲁片一区二区三区在线观看| 久久免费电影网| 国产一区二区三区四区在线观看| 91精品国产一区二区人妖| 亚洲午夜在线电影| 色综合天天性综合| 樱桃视频在线观看一区| 99re在线精品| 亚洲制服丝袜在线| 欧美在线一区二区| 亚洲第一久久影院| 91精品国产色综合久久不卡蜜臀 | 538prom精品视频线放| 91婷婷韩国欧美一区二区| 亚洲美女少妇撒尿| 欧美一区二区在线播放| 日韩视频中午一区| 成人av在线网站| 亚洲香肠在线观看| 精品捆绑美女sm三区| 国产一区啦啦啦在线观看| 国产精品少妇自拍| 日本国产一区二区| 精品一区二区在线播放| 国产精品久久久久久亚洲毛片| 欧美性生活久久| 国模冰冰炮一区二区| **性色生活片久久毛片| 欧美日韩高清一区二区三区| 狠狠久久亚洲欧美| 亚洲色图制服丝袜| 亚洲乱码国产乱码精品精98午夜| 欧美人与性动xxxx| 国产91色综合久久免费分享| 亚洲在线一区二区三区| 久久一区二区三区国产精品| 91亚洲资源网| 国产精品99久久久久久久女警| 亚洲国产精品久久艾草纯爱| 中文字幕av一区二区三区| 3d成人动漫网站| 91丝袜国产在线播放| 国产真实乱子伦精品视频| 亚洲bdsm女犯bdsm网站| 国产精品免费久久| 精品国产第一区二区三区观看体验 | 久久99国产精品麻豆| 亚洲成av人**亚洲成av**| 激情小说欧美图片| 青草国产精品久久久久久| 一区二区三区中文字幕在线观看| 国产精品久久毛片av大全日韩| 久久综合色之久久综合| 精品国产乱码久久久久久蜜臀 | 欧美国产一区在线| 国产亚洲精品中文字幕| 精品盗摄一区二区三区| 精品国产欧美一区二区| 精品国产亚洲在线| 欧美www视频| 日韩欧美自拍偷拍| 日韩一区二区三区电影| 3751色影院一区二区三区| 7777精品伊人久久久大香线蕉完整版 | 欧美美女bb生活片| 欧美片在线播放| 91精品免费观看| 欧美一区二区三区视频在线| 欧美一区二区在线观看| 欧美电影免费观看高清完整版在| 欧美成人激情免费网| 精品国产露脸精彩对白| 国产日本亚洲高清| 国产精品久久久久桃色tv| 樱桃视频在线观看一区| 蜜臀av性久久久久av蜜臀妖精| 久久99国产精品尤物| 成人精品视频网站| 91麻豆精品国产91久久久久久 | 欧洲精品视频在线观看| 欧美日韩国产美女| 久久久噜噜噜久久中文字幕色伊伊 | 国内精品视频666| 91麻豆蜜桃一区二区三区| 91精品国产欧美日韩| 国产女人18毛片水真多成人如厕 | 高清视频一区二区| 欧美片网站yy| 中文字幕二三区不卡| 亚洲国产精品久久人人爱蜜臀| 激情久久久久久久久久久久久久久久| 丁香激情综合国产| 欧美蜜桃一区二区三区| 国产精品久久久久久久久免费樱桃 | 日韩午夜激情电影| 中文字幕一区av| 久久精品99国产精品| 在线观看欧美精品| 另类的小说在线视频另类成人小视频在线 | 欧美日韩夫妻久久| 中文字幕亚洲一区二区av在线 | 成人晚上爱看视频| 日韩欧美国产综合| 艳妇臀荡乳欲伦亚洲一区| 成人毛片老司机大片| 久久久777精品电影网影网| 精品亚洲成a人在线观看| 欧美性大战久久| 综合色天天鬼久久鬼色| 国产成人av影院| 久久亚洲一区二区三区四区| 青青草成人在线观看| 欧美日韩在线三区| 亚洲免费观看视频| 91免费观看在线| 亚洲欧洲性图库| 99视频精品在线| 亚洲精品欧美二区三区中文字幕| 成人av在线电影| 亚洲欧美日韩久久| 欧美日韩午夜影院| 日韩国产精品久久| 精品嫩草影院久久| 国产成人av电影在线| 国产精品久久久久影院亚瑟| 91亚洲国产成人精品一区二三 | 在线观看精品一区| 日日摸夜夜添夜夜添亚洲女人| 欧美视频三区在线播放| 久久精品国产网站| 欧美国产综合一区二区| 色婷婷一区二区| 婷婷综合另类小说色区| 欧美xxx久久| 成人app软件下载大全免费| 一区二区视频在线看| 日韩欧美中文字幕一区| 成人性生交大片免费看中文| 午夜视频在线观看一区二区三区| 51精品秘密在线观看| 国产成人自拍在线| 性久久久久久久| 久久久蜜桃精品| 欧美日韩免费一区二区三区视频| 美女视频第一区二区三区免费观看网站| 国产欧美一区二区精品性色超碰 | 亚洲成a人片综合在线| 中日韩av电影| 欧美日韩精品三区| 丁香婷婷综合色啪| 三级欧美韩日大片在线看| 国产精品久久久久9999吃药| 日韩丝袜情趣美女图片| 在线亚洲一区观看| 国产成人99久久亚洲综合精品| 亚洲444eee在线观看| 亚洲男人的天堂一区二区| 国产亚洲欧美日韩俺去了| 日韩欧美在线观看一区二区三区| 91浏览器在线视频| 国产不卡在线播放| 久久99国产乱子伦精品免费| 日韩精品亚洲专区| 亚洲午夜久久久| 一区二区三区四区亚洲| 综合在线观看色| 亚洲天堂成人在线观看| 国产丝袜美腿一区二区三区| 日韩欧美激情在线| 日韩三级电影网址| 日韩一区二区三区精品视频| 91精品欧美久久久久久动漫| 69堂成人精品免费视频| 欧美一级国产精品| 日韩欧美色综合网站| 久久蜜桃香蕉精品一区二区三区| 精品奇米国产一区二区三区| 欧美一区二区三区四区视频| 91麻豆精品国产91久久久| 日韩精品专区在线影院重磅|