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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pc.c

?? UCGUI在8051下的移植.簡單文件初見.大家一起學(xué)習(xí).
?? C
?? 第 1 頁 / 共 2 頁
字號:
    INT16U      offset;


    offset  = (INT16U)y * DISP_MAX_X * 2 + (INT16U)x * 2;   /* Calculate position of 1st character     */
    pscr    = MK_FP(DISP_BASE, offset);
    while (*s) {
        *pscr++ = *s++;                                     /* Put character in video RAM              */
        *pscr++ = color;                                    /* Put video attribute in video RAM        */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                             RETURN TO DOS
*
* Description : This functions returns control back to DOS by doing a 'long jump' back to the saved
*               location stored in 'PC_JumpBuf'.  The saved location was established by the function
*               'PC_DOSSaveReturn()'.  After execution of the long jump, execution will resume at the 
*               line following the 'set jump' back in 'PC_DOSSaveReturn()'.  Setting the flag 
*               'PC_ExitFlag' to TRUE ensures that the 'if' statement in 'PC_DOSSaveReturn()' executes.
*
* Arguments   : None
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DOSReturn (void) KCREENTRANT
{
    PC_ExitFlag = TRUE;                                    /* Indicate we are returning to DOS         */
    longjmp(PC_JumpBuf, 1);                                /* Jump back to saved environment           */
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        SAVE DOS RETURN LOCATION
*
* Description : This function saves the location of where we are in DOS so that it can be recovered.
*               This allows us to abort multitasking under uC/OS-II and return back to DOS as if we had
*               never left.  When this function is called by 'main()', it sets 'PC_ExitFlag' to FALSE
*               so that we don't take the 'if' branch.  Instead, the CPU registers are saved in the
*               long jump buffer 'PC_JumpBuf' and we simply return to the caller.  If a 'long jump' is
*               performed using the jump buffer then, execution would resume at the 'if' statement and
*               this time, if 'PC_ExitFlag' is set to TRUE then we would execute the 'if' statements and
*               restore the DOS environment.
*
* Arguments   : None
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DOSSaveReturn (void) KCREENTRANT
{
#if OS_CRITICAL_METHOD == 3
    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                 */
    
    OS_ENTER_CRITICAL();
    PC_VectSet(VECT_DOS_CHAIN, PC_TickISR);                /* Store MS-DOS's tick to chain             */
    OS_EXIT_CRITICAL();
    
    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             */
        PC_VectSet(VECT_TICK, PC_TickISR);                 /* Restore DOS's tick vector                */
        OS_EXIT_CRITICAL();
        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) KCREENTRANT
{
    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.
*********************************************************************************************************
*/

data INT16U TickCount;

void UserTickTimer(void) KCREENTRANT
{
	TickCount++;
}

void PC_ElapsedStart(void) KCREENTRANT
{
//
//	INT8U vdata;
//
//
//    vdata  = (INT8U)inp(0x61);                              /* Disable timer #2                         */
//    vdata &= 0xFE;
//    outp(0x61, vdata);
//    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);
//    vdata |= 0x01;                                          /* Start the timer                          */
//    outp(0x61, vdata);
    TickCount=0;
}
/*$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)
*********************************************************************************************************
*/
INT16U PC_ElapsedStop(void) KCREENTRANT
{
    return TickCount;
//    INT8U  vdata;
//    INT8U  low;
//    INT8U  high;
//    INT16U cnts;
//
//
//    vdata  = inp(0x61);                                           /* Disable the timer                  */
//    vdata &= 0xFE;
//    outp(0x61, vdata);
//    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 */
//    return ((INT16U)((ULONG)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 19 bytes (includes the NUL) of storage in the return 
*                    string.
*
* Returns    : none
*********************************************************************************************************
*/
void PC_GetDateTime (char *s) KCREENTRANT
{
    struct time now;
    struct date today;


    gettime(&now);
    getdate(&today);
    sprintf(s, "%02bd-%02bd-%02bd  %02bd:%02bd:%02bd",
               today.da_mon,
               today.da_day,
               today.da_year,
               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
*********************************************************************************************************
*/
BOOLEAN PC_GetKey (INT16S *c) KCREENTRANT
{
    if (kbhit()) {                                         /* See if a key has been pressed            */
        *c = 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
*********************************************************************************************************
*/
void PC_SetTickRate (INT16U freq) KCREENTRANT
{
    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;
    }
    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                                     */
}
/*$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    : none
*********************************************************************************************************
*/
void *PC_VectGet (INT8U vect) KCREENTRANT
{
    return (getvect(vect));
}

/*
*********************************************************************************************************
*                                        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
*********************************************************************************************************
*/
void PC_VectSet (INT8U vect, void (*isr)(void)) KCREENTRANT
{
    setvect(vect, (void interrupt (*)(void))isr);
}


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品不卡在线观看| 国产精品996| 亚洲一区二区三区四区在线观看 | 欧美一卡二卡三卡| 欧美色男人天堂| 色狠狠色噜噜噜综合网| 色综合天天综合在线视频| 91偷拍与自偷拍精品| 99在线精品免费| 99久久777色| 色悠悠亚洲一区二区| 97久久超碰国产精品电影| 99久久久久久| 99国产精品久| 在线观看视频91| 精品视频在线免费看| 欧美日韩高清一区| 日韩西西人体444www| 日韩三级在线观看| 国产欧美综合在线| 中日韩免费视频中文字幕| 国产精品久久久久久久久免费相片 | 亚洲图片欧美综合| 日韩av成人高清| 精品写真视频在线观看| 国产成人精品1024| 色偷偷88欧美精品久久久| 欧美性淫爽ww久久久久无| 欧美欧美午夜aⅴ在线观看| 欧美一区二区三区日韩| 精品噜噜噜噜久久久久久久久试看| 欧美成人video| 国产午夜精品福利| 曰韩精品一区二区| 日本欧美一区二区| 国产精品一区二区在线观看网站| 本田岬高潮一区二区三区| 在线视频国内一区二区| 日韩无一区二区| 国产女人18水真多18精品一级做| 亚洲欧美电影院| 三级欧美韩日大片在线看| 韩国视频一区二区| 97aⅴ精品视频一二三区| 欧美日本精品一区二区三区| 亚洲精品在线网站| 伊人婷婷欧美激情| 久久疯狂做爰流白浆xx| 99久久精品免费看国产| 欧美日韩一卡二卡三卡 | 国产精品无遮挡| 亚洲香肠在线观看| 国产毛片精品视频| 欧美三级视频在线观看| 欧美极品少妇xxxxⅹ高跟鞋 | 一区二区欧美精品| 在线观看亚洲精品视频| 成人妖精视频yjsp地址| 欧美综合一区二区| 日韩欧美在线网站| 最新不卡av在线| 免费日本视频一区| 色诱视频网站一区| 国产亚洲一本大道中文在线| 亚洲国产精品一区二区www| 成人免费视频网站在线观看| 日日噜噜夜夜狠狠视频欧美人| 日韩av高清在线观看| 成人教育av在线| 一区视频在线播放| 亚洲最新视频在线观看| 99久久久精品| 亚洲国产精品成人综合| 国产一区二区不卡| 91欧美一区二区| 国产精品美女久久久久久久网站| 日产精品久久久久久久性色| 欧美日本不卡视频| 一区二区免费在线播放| 日本道色综合久久| 综合欧美一区二区三区| 成人avav影音| 国产精品蜜臀在线观看| 972aa.com艺术欧美| 国产精品大尺度| 成人激情小说网站| 国产精品二三区| proumb性欧美在线观看| 国内精品国产三级国产a久久| 欧美一区二区久久| 美女mm1313爽爽久久久蜜臀| 91麻豆精品91久久久久久清纯| 五月天婷婷综合| 欧美日韩精品电影| 亚洲国产sm捆绑调教视频 | 国产精品美女久久久久久| 国产成人av福利| 久久精品在这里| www.久久久久久久久| 国产情人综合久久777777| 国产福利91精品一区二区三区| 久久久久国产精品厨房| 成人午夜在线播放| 国产精品女主播av| 99re成人精品视频| 亚洲永久免费视频| 欧美日韩视频一区二区| 裸体在线国模精品偷拍| 久久先锋影音av鲁色资源| 国产成人免费网站| 亚洲日本中文字幕区| 欧美天天综合网| 日韩精品久久久久久| 欧美成va人片在线观看| 国产成人午夜视频| 18欧美亚洲精品| 欧美三级资源在线| 精品一区二区三区欧美| 欧美经典一区二区| 色欧美日韩亚洲| 亚洲超碰97人人做人人爱| 精品久久久久久久久久久久久久久久久 | 欧美变态口味重另类| 国产一区二区伦理| 中文字幕永久在线不卡| 欧美亚洲高清一区| 亚洲成人久久影院| 精品久久国产字幕高潮| 丰满少妇久久久久久久| 亚洲激情综合网| 欧美一区二区三区思思人| 国产a区久久久| 亚洲国产美国国产综合一区二区| 日韩精品一区在线| av一本久道久久综合久久鬼色| 性做久久久久久| 欧美变态凌虐bdsm| 欧美日韩一区二区三区四区五区| 美女视频免费一区| 日韩毛片视频在线看| 日韩一区二区三区电影| jlzzjlzz国产精品久久| 亚洲国产精品自拍| 日韩一区二区三区免费观看| 91国模大尺度私拍在线视频| 精品一区二区免费视频| 一区二区日韩av| 国产日韩精品一区二区三区| 欧美日韩精品专区| 成人听书哪个软件好| 五月综合激情婷婷六月色窝| 亚洲国产精品v| 91久久精品日日躁夜夜躁欧美| 国产自产v一区二区三区c| 一区二区三区在线视频免费观看| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲在线中文字幕| 久久久久久一级片| 欧美日产在线观看| 99久久久精品| 国产高清精品在线| 爽爽淫人综合网网站| 国产视频一区二区在线| 欧美一区二区三区色| 91在线观看地址| 国产原创一区二区三区| 午夜不卡在线视频| 亚洲一区免费在线观看| 国产精品久久久久一区| 精品久久久三级丝袜| 欧美精品久久一区| 在线观看免费亚洲| 99精品视频在线播放观看| 成人aaaa免费全部观看| 韩国三级中文字幕hd久久精品| 婷婷成人激情在线网| 一卡二卡三卡日韩欧美| 国产精品视频你懂的| 欧美精品一区二区三| 欧美人伦禁忌dvd放荡欲情| 欧美日韩精品一区二区天天拍小说| 99久久精品免费| 高清国产一区二区| 狠狠色丁香婷婷综合| 男女视频一区二区| 一区二区成人在线观看| 中文字幕的久久| 国产精品天天看| 国产午夜久久久久| 久久精品日韩一区二区三区| 精品第一国产综合精品aⅴ| 精品国产麻豆免费人成网站| 日韩手机在线导航| 日韩欧美中文字幕一区| 91麻豆精品国产综合久久久久久 | 51精品国自产在线| 538prom精品视频线放| 欧美精品1区2区3区| 91视频观看视频| 99久久精品久久久久久清纯|