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

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

?? pc.c

?? Ucosii 2.52 for lpc2100.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网站在线| 欧美日韩精品综合在线| 国产精品成人在线观看| 国产一区二区影院| 91精品国产高清一区二区三区| 国产精品久久久久桃色tv| 激情伊人五月天久久综合| 欧美午夜寂寞影院| 亚洲色图在线视频| 高清av一区二区| 国产亚洲欧洲997久久综合| 日韩va亚洲va欧美va久久| 91精品福利在线| 国产精品精品国产色婷婷| 国产精品一品二品| 久久综合九色综合欧美就去吻| 日韩成人一级片| 欧美一区二区三区在线| 日日夜夜免费精品视频| 欧美系列日韩一区| 亚洲午夜影视影院在线观看| 91黄色小视频| 亚洲一区二区成人在线观看| 在线观看成人免费视频| 一区二区三区日韩| 色哟哟日韩精品| 亚洲一区欧美一区| 欧美日韩成人综合在线一区二区| 亚洲夂夂婷婷色拍ww47| 在线视频你懂得一区| 一区二区三区欧美| 欧美日韩中字一区| 日韩精品91亚洲二区在线观看| 欧美日韩1区2区| 日韩影院精彩在线| 欧美一级欧美一级在线播放| 亚洲一区二区三区国产| 欧美一区日本一区韩国一区| 美女网站一区二区| 久久久不卡网国产精品一区| 成人免费av资源| 最新不卡av在线| 欧美四级电影在线观看| 美日韩一区二区| 久久久影视传媒| 日韩欧美国产精品一区| 国产麻豆日韩欧美久久| 国产精品国产自产拍高清av王其| 91麻豆国产精品久久| 亚欧色一区w666天堂| 精品久久人人做人人爽| 成人黄色综合网站| 亚洲国产精品综合小说图片区| 日韩午夜激情视频| 国产91精品一区二区麻豆网站| 最新国产成人在线观看| 7777女厕盗摄久久久| 国产成人精品亚洲日本在线桃色| 亚洲欧洲国产日韩| 91精品中文字幕一区二区三区| 国产一区二区三区在线观看免费 | 一本色道亚洲精品aⅴ| 青青草伊人久久| 欧美激情一区二区| 欧美日韩高清一区二区三区| 国产99一区视频免费| 天天操天天综合网| 国产女人18毛片水真多成人如厕| 欧美视频第二页| 国产成人8x视频一区二区| 99视频超级精品| 蜜乳av一区二区| 一区二区三区四区在线播放| 精品日韩成人av| 欧美亚一区二区| 成人精品国产福利| 麻豆freexxxx性91精品| 亚洲美女精品一区| 26uuu久久天堂性欧美| 欧美日韩国产在线播放网站| www.亚洲色图| 国产自产2019最新不卡| 婷婷中文字幕综合| 中文字幕日韩精品一区| 久久品道一品道久久精品| 在线电影一区二区三区| 99国产精品久久| 国产成人av电影在线| 久久99国产精品久久99| 亚洲18女电影在线观看| 一区二区三区在线视频观看| 中文无字幕一区二区三区| 精品国产一区二区亚洲人成毛片| 欧美日韩在线精品一区二区三区激情| 成人性色生活片免费看爆迷你毛片| 美腿丝袜在线亚洲一区| 三级影片在线观看欧美日韩一区二区| 亚洲视频一区二区在线观看| 亚洲国产精品v| 国产日本一区二区| 国产亚洲女人久久久久毛片| 欧美成人激情免费网| 日韩午夜激情电影| 日韩欧美成人激情| 欧美精品一二三| 欧美日韩亚洲另类| 欧美日韩精品系列| 538在线一区二区精品国产| 欧美日韩一卡二卡三卡 | www.日韩在线| 日韩一级免费观看| 日韩女同互慰一区二区| 日韩欧美一区二区视频| 欧美一区二区三区在线观看| 日韩三级在线观看| 日韩精品在线一区| 久久中文娱乐网| 欧美激情中文字幕| 综合激情成人伊人| 亚洲综合视频网| 亚洲.国产.中文慕字在线| 日韩成人伦理电影在线观看| 精品一区二区影视| 丁香激情综合国产| 色综合久久综合网97色综合| 欧美天堂一区二区三区| 欧美一级爆毛片| 国产丝袜欧美中文另类| 日韩一区有码在线| 天堂一区二区在线| 国产精品99精品久久免费| 国产69精品久久久久777| 91在线观看下载| 欧美精品乱码久久久久久| 91精品国产麻豆国产自产在线| 亚洲精品一区二区三区福利| 国产精品久久久久久久第一福利 | 欧美日韩一区成人| 精品久久久久香蕉网| 国产精品欧美经典| 午夜婷婷国产麻豆精品| 国内精品视频666| 91麻豆国产精品久久| 日韩欧美亚洲国产另类| 国产精品欧美一级免费| 午夜亚洲国产au精品一区二区| 狠狠色综合色综合网络| 91一区二区三区在线观看| 欧美一区二区视频在线观看2020 | 欧美自拍丝袜亚洲| 精品国产免费人成在线观看| 国产精品国产三级国产| 奇米影视7777精品一区二区| www.欧美日韩国产在线| 欧美区在线观看| 国产精品久久久久一区二区三区共| 婷婷国产在线综合| 波多野结衣视频一区| 日韩视频在线你懂得| 一区二区三区电影在线播| 国产精品18久久久| 欧美日本高清视频在线观看| 国产精品久久久久毛片软件| 免费在线观看日韩欧美| 91福利视频久久久久| 国产校园另类小说区| 日本中文字幕一区二区有限公司| 99精品视频在线免费观看| 亚洲精品一区二区三区蜜桃下载 | 久久99国产乱子伦精品免费| 99视频超级精品| 久久久久久久久久久久电影| 日韩成人精品在线| 欧美日韩精品专区| 亚洲欧美另类在线| 暴力调教一区二区三区| 久久久亚洲高清| 激情综合网天天干| 欧美一区二区视频观看视频| 亚洲二区在线视频| 91行情网站电视在线观看高清版| 久久精品夜夜夜夜久久| 精品一区二区三区在线播放| 欧美一区二区三区视频免费| 亚洲国产一区在线观看| 欧美制服丝袜第一页| 亚洲精品国产一区二区精华液| 成人午夜激情片| 久久国产精品第一页| 51精品视频一区二区三区| 亚洲第一激情av| 欧美精品精品一区| 亚洲主播在线观看| 欧美亚洲一区二区在线| 午夜天堂影视香蕉久久| 欧美久久高跟鞋激| 美日韩一区二区| 久久九九国产精品|