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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? pc.c

?? UCOS-2.rar
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
{
//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
********************************************************************************************************/

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
92国产精品观看| 国产a级毛片一区| 国产精品久久久久精k8| 欧美精品免费视频| 粉嫩av亚洲一区二区图片| 久久精品久久久精品美女| 亚洲综合激情网| 亚洲欧美在线aaa| 欧美精品一区二区三区视频| 欧洲亚洲精品在线| 国产午夜精品一区二区| 久久免费精品国产久精品久久久久| 在线观看一区不卡| 在线免费观看一区| 欧美中文字幕久久| 欧美性欧美巨大黑白大战| 欧美成人精品福利| 欧美精品日日鲁夜夜添| 欧美日韩一区二区三区不卡| 欧美一区二区三区在线观看视频| 午夜精品久久久久久久99樱桃| 一本色道久久加勒比精品 | 日韩毛片视频在线看| 久久久亚洲精品石原莉奈| 一本一道久久a久久精品综合蜜臀| 国产麻豆成人传媒免费观看| 蜜臀av一级做a爰片久久| 日韩成人精品在线观看| 久久精品理论片| 丰满少妇久久久久久久| 福利电影一区二区三区| 成人免费av在线| 色综合天天在线| 欧美一区二区三区在线观看| 欧美日韩精品一二三区| 日韩一级成人av| 久久精品欧美一区二区三区不卡| 国产亚洲欧美日韩俺去了| 国产精品久久久久精k8| 国产精品一区二区免费不卡| 国产在线播放一区| 欧美在线一区二区三区| 精品国产三级电影在线观看| 国产精品色呦呦| 日本91福利区| gogogo免费视频观看亚洲一| 欧美日韩国产乱码电影| 久久婷婷国产综合国色天香| 一区二区成人在线观看| 激情成人综合网| 欧美日本一区二区三区| 国产精品高潮久久久久无| 日韩高清不卡在线| 99国产欧美另类久久久精品| 欧美tk—视频vk| 日韩精品一二三区| 91久久精品一区二区三区| 国产午夜精品一区二区 | 一本久道中文字幕精品亚洲嫩| 91精品欧美综合在线观看最新 | 欧美日韩视频第一区| 中文字幕高清不卡| 国产精品中文有码| 日韩一区二区三区免费观看| 亚洲激情六月丁香| zzijzzij亚洲日本少妇熟睡| 亚洲精品一区二区三区影院| 婷婷成人综合网| 欧美福利视频一区| 亚洲国产精品一区二区久久| 成人午夜电影网站| 国产精品天天看| av电影一区二区| 亚洲人成精品久久久久久| av不卡一区二区三区| 亚洲人成亚洲人成在线观看图片| 国产精品123| 中文字幕一区二区视频| 色久综合一二码| 亚洲一二三区视频在线观看| 欧美视频一区在线观看| 亚欧色一区w666天堂| 欧美丰满美乳xxx高潮www| 日韩精品每日更新| 久久精品一区二区三区不卡| 国产精品456| 亚洲尤物视频在线| 亚洲日本va午夜在线电影| 91啪九色porn原创视频在线观看| 亚洲欧美一区二区视频| 欧美肥妇bbw| 91亚洲精品乱码久久久久久蜜桃| 亚洲午夜电影在线| 2020国产成人综合网| 99久久免费视频.com| 三级在线观看一区二区| 久久综合九色综合欧美就去吻| 91在线免费看| 国产一区二区91| 亚洲综合激情网| 欧美国产激情二区三区| 制服丝袜亚洲网站| 972aa.com艺术欧美| 国产在线精品一区二区夜色| 《视频一区视频二区| 精品毛片乱码1区2区3区| 色美美综合视频| 粉嫩在线一区二区三区视频| 琪琪一区二区三区| 一区二区三区日韩在线观看| 久久久久久99久久久精品网站| 欧美日韩色一区| 一本大道久久a久久综合婷婷| 一本大道综合伊人精品热热| 国产精品12区| 国产福利精品导航| 久久99国内精品| 麻豆精品视频在线观看免费| 亚洲大型综合色站| 午夜精品久久久久久| 亚洲第四色夜色| 午夜精品一区二区三区电影天堂| 国产精品久久久久久久久图文区| 久久久综合精品| 日本一二三不卡| 中文字幕av资源一区| 国产精品久久福利| 亚洲男帅同性gay1069| 一区二区三区不卡视频| 亚洲福利视频导航| 丝袜诱惑制服诱惑色一区在线观看 | 国产片一区二区三区| 91国偷自产一区二区三区成为亚洲经典 | 亚洲丝袜制服诱惑| 中文字幕免费一区| 亚洲特级片在线| 日本亚洲视频在线| 国产精品99久| 欧美一级黄色录像| 国产日韩欧美制服另类| 国产精品电影院| 亚洲第一成人在线| 激情六月婷婷久久| 色哟哟国产精品| 在线观看91视频| 精品久久国产97色综合| 中文字幕 久热精品 视频在线| 久久久99精品免费观看不卡| 国产精品久久久久久久久免费桃花| 国产精品国产自产拍高清av王其| 亚洲天堂2014| 麻豆中文一区二区| 日本人妖一区二区| 成人免费毛片高清视频| 国产91丝袜在线18| 欧美日本一区二区在线观看| 久久久久久久久久久99999| 亚洲欧美偷拍另类a∨色屁股| 亚洲午夜影视影院在线观看| 激情深爱一区二区| 一本到高清视频免费精品| 久久尤物电影视频在线观看| 中文字幕一区二区三区av| 日韩在线一区二区三区| 国产91精品露脸国语对白| 色94色欧美sute亚洲线路二| 久久综合网色—综合色88| 亚洲高清一区二区三区| 福利电影一区二区| 欧美一区二区三区免费大片| 亚洲视频一区二区在线观看| 国产成人自拍网| 日韩女优av电影| 香蕉乱码成人久久天堂爱免费| 不卡影院免费观看| 日韩一区二区在线看| 亚洲制服丝袜一区| 色999日韩国产欧美一区二区| 久久精品一区二区三区av| 久久精品国产一区二区| 色综合咪咪久久| 久久综合色天天久久综合图片| 亚洲国产一区二区视频| 91成人免费网站| 亚洲六月丁香色婷婷综合久久| 成人免费视频一区| 国产麻豆精品视频| 久久精品在线免费观看| 国产成人啪午夜精品网站男同| 国产欧美精品一区| 91久久精品一区二区二区| 日韩精品一卡二卡三卡四卡无卡| 欧美xxxx在线观看| 97久久超碰国产精品| 亚洲va中文字幕| 亚洲国产精品成人综合色在线婷婷 | 成人午夜视频免费看| 亚洲欧洲在线观看av| 色婷婷亚洲综合| 激情综合色综合久久|