亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
成人av网址在线观看| 欧美性猛片xxxx免费看久爱| av在线不卡免费看| 欧美一区二区三区男人的天堂| 国产精品国产三级国产普通话蜜臀 | 激情综合网av| 欧美日韩综合色| 亚洲欧美综合另类在线卡通| 久久精品国产色蜜蜜麻豆| 色94色欧美sute亚洲线路二 | 免费观看30秒视频久久| 色婷婷综合中文久久一本| 久久免费看少妇高潮| 午夜精品福利一区二区三区av | 91精品国产综合久久香蕉麻豆| 国产精品国产三级国产| 国产毛片精品视频| 日韩一区二区三区四区五区六区 | 国产精品成人一区二区艾草| 国产在线精品国自产拍免费| 777午夜精品免费视频| 亚洲一区二区欧美| 在线一区二区观看| 中文字幕日韩精品一区| 不卡欧美aaaaa| 中文字幕精品—区二区四季| 懂色av一区二区三区蜜臀| 精品国产百合女同互慰| 免费成人在线视频观看| 欧美一区二区三区电影| 激情深爱一区二区| 欧美高清视频一二三区| 日韩精品一卡二卡三卡四卡无卡| 欧美色倩网站大全免费| 亚洲国产欧美在线| 欧美另类久久久品| 全部av―极品视觉盛宴亚洲| 欧美一级爆毛片| 久久99久久久久久久久久久| 精品对白一区国产伦| 国产福利精品导航| 国产精品久久毛片av大全日韩| eeuss鲁片一区二区三区在线看| √…a在线天堂一区| 色诱亚洲精品久久久久久| 亚洲一区二区三区不卡国产欧美| 欧美日本国产视频| 久久se这里有精品| 国产精品午夜在线观看| 一本一道久久a久久精品综合蜜臀| 亚洲影视在线观看| 日韩久久免费av| 国产69精品一区二区亚洲孕妇| 1000精品久久久久久久久| 欧美亚洲国产怡红院影院| 日本中文字幕一区二区有限公司| 日韩欧美国产不卡| 高清成人免费视频| 亚洲一区二区视频在线观看| 日韩欧美国产一区在线观看| 91亚洲国产成人精品一区二三| 五月激情综合婷婷| 国产午夜精品一区二区三区视频 | 成人午夜视频福利| 亚洲一二三区在线观看| 欧美一区二区三区在线观看| 国产成人精品免费视频网站| 亚洲三级电影网站| 日韩欧美一区在线| 99久久99久久久精品齐齐| 三级久久三级久久| 国产精品二区一区二区aⅴ污介绍| 欧美日韩三级一区| 成人久久视频在线观看| 亚州成人在线电影| 国产女同互慰高潮91漫画| 欧美三级在线看| 成人激情校园春色| 麻豆一区二区三| 悠悠色在线精品| 国产亚洲综合色| 欧美一区三区四区| 欧美精品 日韩| av激情成人网| 久久成人麻豆午夜电影| 亚洲国产精品影院| 亚洲色图欧美在线| 亚洲精品一区二区三区精华液| 在线观看视频一区二区欧美日韩| 国精产品一区一区三区mba视频| 亚洲一区二区三区四区在线| 日韩伦理免费电影| 国产喷白浆一区二区三区| 精品久久人人做人人爱| 欧美日韩一卡二卡| 色婷婷久久久久swag精品| 成人18精品视频| 国产精品一区二区91| 久久福利视频一区二区| 首页亚洲欧美制服丝腿| 亚洲自拍另类综合| 亚洲精品成a人| 亚洲美女区一区| 亚洲人成亚洲人成在线观看图片 | 日韩欧美成人激情| 欧美三日本三级三级在线播放| 99精品久久久久久| 成人毛片在线观看| 99久久久久免费精品国产| 国产99一区视频免费 | 欧美国产欧美综合| 久久久美女艺术照精彩视频福利播放 | 国产视频一区在线播放| 亚洲精品一区二区在线观看| 精品99999| 国产欧美日韩激情| 国产精品久久三区| 亚洲色图第一区| 亚洲国产视频网站| 亚洲国产成人av| 视频一区视频二区中文字幕| 亚洲va中文字幕| 蜜臀av在线播放一区二区三区| 欧美aaa在线| 韩国成人在线视频| 成人美女视频在线观看| 91在线观看地址| 欧美日韩精品三区| 日韩免费视频线观看| 久久久久国产精品麻豆| 中文字幕成人网| 亚洲第一会所有码转帖| 麻豆国产91在线播放| 国产一区二区三区久久久| 成人永久aaa| 欧美性生活大片视频| 欧美一区二区三区喷汁尤物| 久久久www免费人成精品| 国产精品白丝在线| 亚洲一区免费视频| 久久国产尿小便嘘嘘尿| www.日韩av| 欧美高清视频不卡网| 久久久久久亚洲综合| 亚洲人精品午夜| 久久精品国产**网站演员| 岛国精品在线播放| 欧美日韩mp4| 国产精品天天看| 日韩电影在线免费观看| 成人在线视频一区| 欧美男男青年gay1069videost | 91精品国产综合久久精品麻豆| 欧美电影免费观看高清完整版 | 91在线小视频| 欧美一级在线观看| 亚洲图片欧美激情| 久久精品久久综合| 在线一区二区三区四区五区| 26uuu国产电影一区二区| 尤物av一区二区| 国产丶欧美丶日本不卡视频| 欧美系列一区二区| 18涩涩午夜精品.www| 国内偷窥港台综合视频在线播放| 欧美综合色免费| 国产精品乱码妇女bbbb| 蜜桃视频在线观看一区二区| 色天天综合色天天久久| 久久久久久久电影| 久久狠狠亚洲综合| 欧美精品自拍偷拍动漫精品| 亚洲天堂精品在线观看| 国产成人av在线影院| 欧美大度的电影原声| 亚洲国产精品一区二区www在线| 成人动漫一区二区三区| 久久综合久久久久88| 视频一区二区三区入口| 91福利社在线观看| 亚洲欧洲国产日韩| 白白色 亚洲乱淫| 国产欧美一区二区精品秋霞影院| 久久国产剧场电影| 日韩一级二级三级精品视频| 亚洲大尺度视频在线观看| 在线精品视频免费播放| 亚洲美女视频一区| 91在线无精精品入口| 日韩美女视频19| 91视频在线观看| 亚洲男同性恋视频| 97se亚洲国产综合自在线不卡 | 色久优优欧美色久优优| 国产精品超碰97尤物18| 成人av午夜影院| 亚洲欧美日韩在线不卡| 色婷婷一区二区三区四区| 一区二区三区精品视频在线| 91黄色小视频|