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

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

?? pc.c

?? ucos很好的學習代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
*********************************************************************************************************
*                                          PC SUPPORT FUNCTIONS
*
*                        (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL
*                                           All Rights Reserved
*
* File : PC.C
* By   : Jean J. Labrosse
*********************************************************************************************************
*/

#include "includes.h"

/*
*********************************************************************************************************
*                                               CONSTANTS
*********************************************************************************************************
*/
#define  DISP_BASE                  0xB800       /* Base segment of display (0xB800=VGA, 0xB000=Mono)  */
#define  DISP_MAX_X                     80       /* Maximum number of columns                          */
#define  DISP_MAX_Y                     25       /* Maximum number of rows                             */

#define  TICK_T0_8254_CWR             0x43       /* 8254 PIT Control Word Register address.            */
#define  TICK_T0_8254_CTR0            0x40       /* 8254 PIT Timer 0 Register address.                 */
#define  TICK_T0_8254_CTR1            0x41       /* 8254 PIT Timer 1 Register address.                 */
#define  TICK_T0_8254_CTR2            0x42       /* 8254 PIT Timer 2 Register address.                 */

#define  TICK_T0_8254_CTR0_MODE3      0x36       /* 8254 PIT Binary Mode 3 for Counter 0 control word. */
#define  TICK_T0_8254_CTR2_MODE0      0xB0       /* 8254 PIT Binary Mode 0 for Counter 2 control word. */
#define  TICK_T0_8254_CTR2_LATCH      0x80       /* 8254 PIT Latch command control word                */

#define  VECT_TICK                    0x08       /* Vector number for 82C54 timer tick                 */
#define  VECT_DOS_CHAIN               0x81       /* Vector number used to chain DOS                    */

/*
*********************************************************************************************************
*                                       LOCAL GLOBAL VARIABLES
*********************************************************************************************************
*/
             
static INT16U    PC_ElapsedOverhead;
static jmp_buf   PC_JumpBuf;
static BOOLEAN   PC_ExitFlag;
void           (*PC_TickISR)(void);

/*$PAGE*/
/*
*********************************************************************************************************
*                                              CLEAR SCREEN
*
* Description : This function clears the PC's screen by directly accessing video RAM instead of using
*               the BIOS.  It assumed that the video adapter is VGA compatible.  Video RAM starts at
*               absolute address 0x000B8000.  Each character on the screen is composed of two bytes:
*               the ASCII character to appear on the screen followed by a video attribute.  An attribute
*               of 0x07 displays the character in WHITE with a black background.
*
* Arguments   : color   specifies the foreground/background color combination to use 
*                       (see PC.H for available choices)
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DispClrScr (INT8U color)
{
    INT8U  far *pscr;
    INT16U      i;


    pscr = MK_FP(DISP_BASE, 0x0000);
    for (i = 0; i < (DISP_MAX_X * DISP_MAX_Y); i++) { /* PC display has 80 columns and 25 lines        */
        *pscr++ = ' ';                                /* Put ' ' character in video RAM                */
        *pscr++ = color;                              /* Put video attribute in video RAM              */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                             CLEAR A LINE
*
* Description : This function clears one of the 25 lines on the PC's screen by directly accessing video 
*               RAM instead of using the BIOS.  It assumed that the video adapter is VGA compatible.  
*               Video RAM starts at absolute address 0x000B8000.  Each character on the screen is 
*               composed of two bytes: the ASCII character to appear on the screen followed by a video 
*               attribute.  An attribute of 0x07 displays the character in WHITE with a black background.
*
* Arguments   : y            corresponds to the desired line to clear.  Valid line numbers are from 
*                            0 to 24.  Line 0 corresponds to the topmost line.
*
*               color        specifies the foreground/background color combination to use 
*                            (see PC.H for available choices)
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DispClrLine (INT8U y, INT8U color)
{
    INT8U far *pscr;
    INT8U      i;


    pscr = MK_FP(DISP_BASE, (INT16U)y * DISP_MAX_X * 2);
    for (i = 0; i < DISP_MAX_X; i++) {
        *pscr++ = ' ';                           /* Put ' ' character in video RAM                     */
        *pscr++ = color;                         /* Put video attribute in video RAM                   */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                           DISPLAY A SINGLE CHARACTER AT 'X' & 'Y' COORDINATE
*
* Description : This function writes a single character anywhere on the PC's screen.  This function
*               writes directly to video RAM instead of using the BIOS for speed reasons.  It assumed 
*               that the video adapter is VGA compatible.  Video RAM starts at absolute address 
*               0x000B8000.  Each character on the screen is composed of two bytes: the ASCII character 
*               to appear on the screen followed by a video attribute.  An attribute of 0x07 displays 
*               the character in WHITE with a black background.
*
* Arguments   : x      corresponds to the desired column on the screen.  Valid columns numbers are from
*                      0 to 79.  Column 0 corresponds to the leftmost column.
*               y      corresponds to the desired row on the screen.  Valid row numbers are from 0 to 24.
*                      Line 0 corresponds to the topmost row.
*               c      Is the ASCII character to display.  You can also specify a character with a 
*                      numeric value higher than 128.  In this case, special character based graphics
*                      will be displayed.
*               color  specifies the foreground/background color to use (see PC.H for available choices)
*                      and whether the character will blink or not.
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DispChar (INT8U x, INT8U y, INT8U c, INT8U color)
{
    INT8U  far *pscr;
    INT16U      offset;


    offset  = (INT16U)y * DISP_MAX_X * 2 + (INT16U)x * 2;  /* Calculate position on the screen         */
    pscr    = MK_FP(DISP_BASE, offset);
    *pscr++ = c;                                           /* Put character in video RAM               */
    *pscr   = color;                                       /* Put video attribute in video RAM         */
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                 DISPLAY A STRING  AT 'X' & 'Y' COORDINATE
*
* Description : This function writes an ASCII string anywhere on the PC's screen.  This function writes
*               directly to video RAM instead of using the BIOS for speed reasons.  It assumed that the 
*               video adapter is VGA compatible.  Video RAM starts at absolute address 0x000B8000.  Each 
*               character on the screen is composed of two bytes: the ASCII character to appear on the 
*               screen followed by a video attribute.  An attribute of 0x07 displays the character in 
*               WHITE with a black background.
*
* Arguments   : x      corresponds to the desired column on the screen.  Valid columns numbers are from
*                      0 to 79.  Column 0 corresponds to the leftmost column.
*               y      corresponds to the desired row on the screen.  Valid row numbers are from 0 to 24.
*                      Line 0 corresponds to the topmost row.
*               s      Is the ASCII string to display.  You can also specify a string containing 
*                      characters with numeric values higher than 128.  In this case, special character 
*                      based graphics will be displayed.
*               color  specifies the foreground/background color to use (see PC.H for available choices)
*                      and whether the characters will blink or not.
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DispStr (INT8U x, INT8U y, INT8U *s, INT8U color)
{
    INT8U  far *pscr;
    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)
{
    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)
{
    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                 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区视频精品免费 | 久久综合九色综合欧美98| 国产激情91久久精品导航 | 日韩高清不卡一区| 国产精品久久网站| 精品三级在线看| 欧美日韩在线精品一区二区三区激情 | 精品亚洲国内自在自线福利| 亚洲影院久久精品| 国产丝袜在线精品| 欧美刺激脚交jootjob| 欧亚一区二区三区| 成人动漫精品一区二区| 捆绑变态av一区二区三区| 一区二区免费在线| 自拍偷拍欧美精品| 国产欧美日韩久久| 2023国产精品| 精品国产一二三区| 欧美精品自拍偷拍动漫精品| 日本韩国精品一区二区在线观看| 国产精品一级二级三级| 美女久久久精品| 秋霞av亚洲一区二区三| 一区二区三区.www| 日韩美女视频一区二区| 欧美激情自拍偷拍| 久久免费视频一区| 欧美本精品男人aⅴ天堂| 欧美一级欧美三级在线观看| 在线不卡免费欧美| 欧美日韩精品电影| 欧美日韩视频在线一区二区| 欧美图片一区二区三区| 在线免费观看不卡av| 91在线码无精品| 99久久精品情趣| 91色婷婷久久久久合中文| av一本久道久久综合久久鬼色| 国产大片一区二区| 国产高清精品在线| 丁香婷婷综合五月| 顶级嫩模精品视频在线看| 国产福利一区在线| 成人综合在线观看| www.在线欧美| 日本道免费精品一区二区三区| 色综合视频在线观看| 欧美无砖砖区免费| 欧美老女人在线| 日韩欧美中文一区| 精品国产91乱码一区二区三区| 日韩免费观看高清完整版| 日韩精品一区二区三区视频播放| 日韩欧美黄色影院| 国产亚洲成年网址在线观看| 国产欧美综合在线| 综合久久久久久| 亚洲国产精品视频| 免费av成人在线| 国产精品亚洲人在线观看| 91在线porny国产在线看| 在线看国产一区| 欧美剧情片在线观看| 欧美成人a∨高清免费观看| 久久日一线二线三线suv| 日本一区二区成人在线| 亚洲激情五月婷婷| 欧美aⅴ一区二区三区视频| 国产毛片一区二区| 在线视频欧美区| 精品久久人人做人人爱| 国产精品欧美精品| 午夜精品福利久久久| 国产一区二区三区av电影| 99国产欧美另类久久久精品| 777久久久精品| 欧美激情一区不卡| 天天色综合天天| 丁香婷婷综合色啪| 欧美猛男男办公室激情| 国产精品无码永久免费888| 亚洲大片免费看| 国产精品一级黄| 欧美日韩国产首页| 国产精品欧美久久久久一区二区| 日韩精品成人一区二区三区| 成人免费毛片片v| 欧美日韩国产综合草草| 欧美国产日本视频| 美国毛片一区二区三区| 色8久久精品久久久久久蜜| 久久影院电视剧免费观看| 夜夜嗨av一区二区三区| 国产精品一卡二| 日韩一级视频免费观看在线| 亚洲视频免费看| 国产精品中文字幕一区二区三区| 在线精品视频免费观看| 国产婷婷精品av在线| 蜜臀av性久久久久蜜臀aⅴ四虎| 99视频在线精品| 26uuu成人网一区二区三区| 亚洲影视在线播放| 成人精品gif动图一区| 日韩免费高清视频| 亚洲成人av福利| 99久久99精品久久久久久| 久久品道一品道久久精品| 蜜桃视频一区二区三区在线观看 | 91在线播放网址| 国产亚洲综合av| 免费日本视频一区| 欧洲一区二区三区在线| 亚洲视频一区二区在线观看| 成人午夜精品一区二区三区| 精品久久久久久久人人人人传媒| 亚洲第一激情av| 91国产免费看| 亚洲欧美电影院| aaa欧美日韩| 中文字幕av在线一区二区三区| 激情另类小说区图片区视频区| 91精品国产欧美一区二区18| 偷拍一区二区三区| 欧美日本一区二区| 天天影视网天天综合色在线播放| 欧美在线啊v一区| 一区二区三区在线影院| 色综合天天在线| 亚洲美女在线一区| 91激情五月电影| 亚洲精品欧美激情| 日本道精品一区二区三区| 一区二区久久久久久| 欧美色区777第一页| 香蕉成人啪国产精品视频综合网| 精品视频在线看| 人人爽香蕉精品| 精品国产露脸精彩对白| 国产精品一区二区无线| 国产日韩欧美精品综合| www.欧美精品一二区| 综合自拍亚洲综合图不卡区| 99久久99久久综合| 亚洲宅男天堂在线观看无病毒| 精品视频1区2区| 蜜桃免费网站一区二区三区| 欧美精品一区二区三区久久久| 国模少妇一区二区三区| 国产日韩欧美亚洲| 色综合久久久久久久久| 亚洲国产精品人人做人人爽| 91精品国产综合久久久久久| 久久9热精品视频| 国产欧美日韩精品a在线观看| 99精品偷自拍| 午夜欧美视频在线观看| 精品国产91乱码一区二区三区| 从欧美一区二区三区| 一区二区三区四区五区视频在线观看| 欧美日韩一区二区在线观看视频| 日韩国产精品久久久久久亚洲| 亚洲精品一区二区三区四区高清| 国产成人在线视频播放| 亚洲男同性视频| 欧美一三区三区四区免费在线看| 国产乱子伦视频一区二区三区 | 亚洲综合视频在线观看| 91精品国产一区二区三区蜜臀| 国产亚洲成aⅴ人片在线观看| 91国偷自产一区二区使用方法| 日本vs亚洲vs韩国一区三区二区| 亚洲激情图片qvod| 国产精品天干天干在线综合| 亚洲愉拍自拍另类高清精品| 日韩精品中文字幕在线不卡尤物| 欧美亚洲高清一区| 91精品福利视频| 在线观看免费一区| 欧美亚洲综合久久| 色乱码一区二区三区88| 日韩色视频在线观看| 久久综合色鬼综合色| 91丨九色丨国产丨porny| 日本vs亚洲vs韩国一区三区| 欧美激情一区二区三区在线| 欧美三级中文字| 国产福利一区二区| 亚洲国产成人av好男人在线观看| 久久久亚洲综合| 8x8x8国产精品| 91免费看片在线观看| 国产乱色国产精品免费视频| 午夜伦理一区二区| 亚洲视频免费在线| 国产片一区二区| 日韩三级视频在线观看| 欧美影视一区在线| 成人黄色电影在线|