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

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

?? pc.c

?? ARM專輯-152M-pdf.zip
?? 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一区二区三区免费野_久草精品视频
亚洲成人免费看| 日韩视频永久免费| 中文字幕在线视频一区| 成人app网站| 一区二区三区影院| 欧美三区在线视频| 日韩av电影天堂| 日韩精品中午字幕| 国产黑丝在线一区二区三区| 欧美国产日本韩| 色94色欧美sute亚洲线路一久| 有坂深雪av一区二区精品| 欧美猛男gaygay网站| 国模少妇一区二区三区| 欧美激情在线一区二区三区| 欧美影视一区在线| 久久99国产乱子伦精品免费| 国产精品免费免费| 在线观看国产91| 极品瑜伽女神91| 综合在线观看色| 欧美精品自拍偷拍动漫精品| 国产美女在线精品| 亚洲免费在线看| 日韩午夜电影av| 99国产欧美另类久久久精品 | 色哟哟精品一区| 五月综合激情日本mⅴ| 2020日本不卡一区二区视频| 91亚洲精品一区二区乱码| 五月天亚洲婷婷| 日本一区二区综合亚洲| 欧美视频在线一区二区三区| 国产最新精品免费| 亚洲一区二区三区爽爽爽爽爽| 精品国精品国产尤物美女| 在线影视一区二区三区| 国产精品亚洲а∨天堂免在线| 亚洲专区一二三| 国产日韩欧美综合一区| 制服丝袜一区二区三区| 波多野结衣中文一区| 青草国产精品久久久久久| 综合色天天鬼久久鬼色| 日韩欧美一区在线| 欧美亚洲综合色| 成人av网站免费观看| 久久精品99国产精品| 亚洲一区av在线| 国产精品久久久久久亚洲伦| 精品国产三级a在线观看| 欧美日韩一区小说| 91美女在线视频| 国产成人免费xxxxxxxx| 美女免费视频一区二区| 亚洲va在线va天堂| 亚洲精品一卡二卡| 国产精品短视频| 亚洲国产成人在线| 国产午夜亚洲精品不卡| 精品福利一区二区三区免费视频| 欧美日韩中文字幕精品| 色播五月激情综合网| 成人av资源网站| 国产宾馆实践打屁股91| 韩国在线一区二区| 激情都市一区二区| 奇米影视一区二区三区小说| 午夜国产精品影院在线观看| 石原莉奈在线亚洲二区| 午夜精品影院在线观看| 午夜伦欧美伦电影理论片| 亚洲一二三四久久| 亚洲黄色av一区| 一区二区三区日韩欧美精品| 亚洲黄色小视频| 亚洲国产欧美在线| 亚洲成人动漫在线免费观看| 婷婷六月综合网| 日韩成人免费看| 日本aⅴ免费视频一区二区三区| 日日摸夜夜添夜夜添国产精品 | 久久综合九色综合97婷婷女人| 欧美一三区三区四区免费在线看 | 亚洲成在人线在线播放| 亚洲第一成年网| 日韩制服丝袜先锋影音| 日本亚洲免费观看| 久久福利视频一区二区| 国产一区二区精品久久91| 国产成人综合在线| 91婷婷韩国欧美一区二区| 99re8在线精品视频免费播放| 91蝌蚪国产九色| 欧美夫妻性生活| 亚洲精品一区二区三区在线观看| 国产区在线观看成人精品| 国产精品女主播av| 一区二区三区精品在线| 日韩制服丝袜av| 国产高清视频一区| 91久久精品网| 日韩一区二区三区视频| 久久综合久久综合九色| 国产三级精品三级在线专区| 亚洲人成人一区二区在线观看| 亚洲国产日产av| 国产一区二区精品久久91| 色婷婷亚洲一区二区三区| 这里只有精品电影| 久久久国际精品| 亚洲精品第1页| 另类小说视频一区二区| 白白色 亚洲乱淫| 91精品国产综合久久香蕉的特点| 久久无码av三级| 亚洲一区成人在线| 成人在线一区二区三区| 欧美日韩成人一区| 中文av一区特黄| 蜜臀久久久久久久| 91在线云播放| 欧美精品一区视频| 亚洲已满18点击进入久久| 国产一区二区伦理片| 精品视频免费在线| 中文字幕欧美三区| 日本中文一区二区三区| 91免费看`日韩一区二区| 欧美大肚乱孕交hd孕妇| 一个色在线综合| 国产成人av一区二区三区在线 | 午夜激情久久久| 91在线小视频| 国产清纯在线一区二区www| 日韩精品一级中文字幕精品视频免费观看 | 中文字幕一区二区三区不卡在线| 日韩**一区毛片| 日本韩国欧美一区二区三区| 久久众筹精品私拍模特| 日韩精品乱码av一区二区| 91蜜桃网址入口| 亚洲国产成人自拍| 国产一区二区91| 日韩欧美第一区| 天天综合天天综合色| 97超碰欧美中文字幕| 国产欧美久久久精品影院| 久久激情五月激情| 欧美日韩国产欧美日美国产精品| **性色生活片久久毛片| 成人美女在线视频| 国产欧美综合在线观看第十页 | 亚洲午夜久久久久| 91在线视频播放| 国产精品毛片高清在线完整版 | 99re热视频这里只精品| 中文字幕第一区第二区| 国产乱子伦视频一区二区三区| 91精品一区二区三区在线观看| 亚洲一卡二卡三卡四卡无卡久久| 99久久99久久综合| 中文字幕一区二区三区乱码在线 | 色天使久久综合网天天| 国产精品国产三级国产aⅴ原创| 国产美女精品一区二区三区| 精品区一区二区| 国模一区二区三区白浆| 精品久久久久久综合日本欧美 | 国产成人小视频| 国产色综合久久| 成人高清视频在线| 中文字幕一区二区三区在线观看| 成人免费高清在线| 亚洲视频资源在线| 色视频欧美一区二区三区| 亚洲午夜视频在线观看| 精品视频在线看| 九色|91porny| 国产日韩影视精品| 99综合影院在线| 一区二区三区久久| 欧美一级在线视频| 狠狠色狠狠色综合系列| 中文字幕不卡在线播放| 97精品久久久午夜一区二区三区 | 日本强好片久久久久久aaa| 日韩一区二区三免费高清| 九九在线精品视频| 中文字幕亚洲一区二区av在线 | 国内外成人在线| 国产精品嫩草影院av蜜臀| 91麻豆国产香蕉久久精品| 亚洲成人激情自拍| 精品av久久707| 色哟哟一区二区| 精品一区二区免费| 中文字幕在线不卡一区| 91精品在线观看入口| 成人丝袜18视频在线观看|