亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
麻豆精品视频在线观看免费 | 国产乱子轮精品视频| 亚洲人123区| 日本大胆欧美人术艺术动态| 国产综合色视频| 成人aa视频在线观看| 欧美日韩在线综合| 国产亚洲欧美日韩俺去了| 亚洲美女精品一区| 亚洲精品一二三四区| 久久成人精品无人区| 图片区小说区国产精品视频| 高清日韩电视剧大全免费| 欧美亚洲国产一区二区三区| 精品婷婷伊人一区三区三| 精品国产髙清在线看国产毛片| 精品剧情在线观看| 一区二区理论电影在线观看| 极品瑜伽女神91| 色综合天天综合色综合av | 韩国理伦片一区二区三区在线播放 | fc2成人免费人成在线观看播放| 欧美日韩国产不卡| 国产精品久久久久久久久免费丝袜| 午夜av一区二区三区| 中文字幕日韩一区二区| 亚洲老司机在线| 日韩精品一卡二卡三卡四卡无卡| 国产精品伊人色| 欧美高清视频不卡网| 欧美激情艳妇裸体舞| 日韩在线一区二区| 97se亚洲国产综合自在线| 欧美一区午夜视频在线观看| 亚洲欧洲性图库| 免费成人av在线| 色999日韩国产欧美一区二区| 欧美高清在线视频| 麻豆精品久久精品色综合| 风流少妇一区二区| 日韩美女天天操| 日韩一区精品视频| 这里只有精品99re| 五月天久久比比资源色| 91久久奴性调教| 国产精品久久久久久久久免费相片 | 香蕉久久一区二区不卡无毒影院 | 一本大道av伊人久久综合| 久久久亚洲综合| 久久er精品视频| 日韩一区二区精品在线观看| 国产欧美一区二区精品性色超碰 | 奇米在线7777在线精品| 91精品国产欧美一区二区18| 午夜精品在线看| 欧美撒尿777hd撒尿| 亚洲成av人影院在线观看网| 欧美午夜一区二区三区免费大片| 一区二区三区中文字幕| 老司机一区二区| 欧美va亚洲va国产综合| 国内不卡的二区三区中文字幕| 日韩精品一区二区三区在线播放| 蜜乳av一区二区| 久久久精品综合| 国产电影一区在线| 精品国产乱码久久久久久久| 国产精品一品视频| 欧美极品xxx| 色婷婷狠狠综合| 婷婷国产在线综合| 2020国产成人综合网| 国产.精品.日韩.另类.中文.在线.播放| 日韩一级二级三级| 国产精品亚洲视频| 一区二区成人在线视频| 91麻豆精品91久久久久同性| 免费观看91视频大全| 久久久99久久精品欧美| 91在线观看地址| 五月婷婷久久综合| 精品免费日韩av| 99久久精品国产毛片| 亚洲影院久久精品| 久久久综合精品| 在线观看一区二区精品视频| 美女视频黄免费的久久| 国产精品无遮挡| 欧美三级在线视频| 极品销魂美女一区二区三区| 中文字幕一区二区三区乱码在线| 欧美午夜理伦三级在线观看| 国产精品资源站在线| 亚洲综合激情网| 久久久综合精品| 欧美日韩国产三级| 国产河南妇女毛片精品久久久 | 欧美sm极限捆绑bd| 丁香婷婷综合色啪| 亚洲蜜臀av乱码久久精品| 精品黑人一区二区三区久久| 99精品视频在线观看免费| 免费观看30秒视频久久| 亚洲日本一区二区| 国产人久久人人人人爽| 日韩一区二区视频在线观看| 不卡av在线网| 国产毛片精品视频| 全部av―极品视觉盛宴亚洲| 亚洲人成网站色在线观看| 欧美变态tickle挠乳网站| 欧美视频一二三区| 国v精品久久久网| 日本中文在线一区| 国产精品美日韩| 久久久高清一区二区三区| 日韩视频在线永久播放| 欧美日韩一区二区三区四区| 懂色一区二区三区免费观看| 精品一区二区免费看| 一区二区三区免费| 亚洲色图.com| 中文字幕在线观看不卡视频| 久久夜色精品国产噜噜av | 午夜在线电影亚洲一区| 亚洲黄色小说网站| 国产精品久久久久久久久搜平片| 久久久亚洲精品石原莉奈| 欧美xxxxx牲另类人与| 欧美一区午夜视频在线观看 | 亚洲激情一二三区| 日韩美女啊v在线免费观看| 国产精品久久久久久久久快鸭| 日韩欧美国产电影| 欧美日韩大陆在线| 国产二区国产一区在线观看| 91精品国产综合久久精品图片| 91国模大尺度私拍在线视频| 色妞www精品视频| 欧美日韩亚洲另类| 日韩精品中文字幕在线一区| 久久天堂av综合合色蜜桃网| 中文字幕+乱码+中文字幕一区| 自拍偷拍国产精品| 日日夜夜免费精品| 国产精品自产自拍| 欧美专区亚洲专区| 精品久久一区二区| 亚洲人被黑人高潮完整版| 五月综合激情日本mⅴ| 国产一区二区免费视频| 色欧美88888久久久久久影院| 91精品国产91久久久久久最新毛片| 久久久久久一级片| 亚洲一区二区三区四区在线观看| 久久国内精品视频| 一本到高清视频免费精品| 欧美一级精品大片| 综合色中文字幕| 蜜桃久久精品一区二区| 欧美日韩精品一区二区三区四区| 99久久国产综合精品女不卡| 欧美军同video69gay| 久久亚洲精精品中文字幕早川悠里| 亚洲图片另类小说| 狠狠久久亚洲欧美| 欧美午夜一区二区三区免费大片| 国产日韩欧美在线一区| 午夜精品影院在线观看| 不卡的av在线播放| 欧美成人艳星乳罩| 午夜国产精品影院在线观看| 国产999精品久久| 91精品欧美综合在线观看最新| 国产精品欧美久久久久无广告| 蜜臀av国产精品久久久久| 91极品视觉盛宴| 欧美韩国日本一区| 精品一区二区免费在线观看| 欧美日韩一级视频| 亚洲免费av网站| 成人免费高清在线| 久久久久国产成人精品亚洲午夜| 免费在线观看视频一区| 欧美三级三级三级爽爽爽| 亚洲欧美视频在线观看| 国产91高潮流白浆在线麻豆| 精品国精品国产尤物美女| 三级亚洲高清视频| 欧美日韩国产在线观看| 一区二区三区在线播| 91香蕉国产在线观看软件| 中文字幕精品一区二区精品绿巨人 | 91精品国产91久久综合桃花| 日本午夜精品一区二区三区电影| 91网站在线播放| 国产精品久久久久aaaa| 国产成人午夜高潮毛片| 久久久夜色精品亚洲| 国产一区激情在线|