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

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

?? pc.c

?? 這個就是所謂ucos的33個例子
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
*********************************************************************************************************
*                                          PC SUPPORT FUNCTIONS
*
*                          (c) Copyright 1992-2002, Jean J. Labrosse, Weston, 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*/
/*
*********************************************************************************************************
*                           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    = (INT8U far *)MK_FP(DISP_BASE, offset);
    *pscr++ = c;                                           /* Put character in video RAM               */
    *pscr   = color;                                       /* Put video attribute in video RAM         */
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                            CLEAR A COLUMN
*
* Description : This function clears one of the 80 columns 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   : x            corresponds to the desired column to clear.  Valid column numbers are from 
*                            0 to 79.  Column 0 corresponds to the leftmost column.
*
*               color        specifies the foreground/background color combination to use 
*                            (see PC.H for available choices)
*
* Returns     : None
*********************************************************************************************************
*/
void PC_DispClrCol (INT8U x, INT8U color)
{
    INT8U far *pscr;
    INT8U      i;


    pscr = (INT8U far *)MK_FP(DISP_BASE, (INT16U)x * 2);
    for (i = 0; i < DISP_MAX_Y; i++) {
        *pscr++ = ' ';                           /* Put ' ' character in video RAM                     */
        *pscr-- = color;                         /* Put video attribute in video RAM                   */
        pscr    = pscr + DISP_MAX_X * 2;         /* Position on next row                               */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                             CLEAR A ROW
*
* 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 row to clear.  Valid row numbers are from 
*                            0 to 24.  Row 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_DispClrRow (INT8U y, INT8U color)
{
    INT8U far *pscr;
    INT8U      i;


    pscr = (INT8U far *)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*/
/*
*********************************************************************************************************
*                                              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 = (INT8U far *)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*/
/*
*********************************************************************************************************
*                                 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    = (INT8U far *)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)
{
#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                 */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人高清在线| 欧美成人欧美edvon| 欧美性受xxxx黑人xyx性爽| 欧美日韩一区二区三区不卡| 日韩一二在线观看| 国产精品免费视频网站| 天天综合网 天天综合色| 国产在线视频一区二区| 色婷婷狠狠综合| 日韩三级视频中文字幕| 中文成人综合网| 婷婷国产在线综合| 成人动漫中文字幕| 欧美精品久久天天躁| 国产日韩精品视频一区| 亚洲第一福利视频在线| 粉嫩13p一区二区三区| 欧美日韩免费在线视频| 日本一区二区综合亚洲| 日精品一区二区| 99久久精品情趣| 日韩一级黄色大片| 一区二区日韩av| 国产精品一区二区黑丝| 欧美日韩国产不卡| 国产精品免费久久| 蜜臀va亚洲va欧美va天堂 | 亚洲精品一区二区三区四区高清 | 不卡影院免费观看| 日韩精品影音先锋| 一区二区免费在线播放| 国产精品一区专区| 69堂成人精品免费视频| 亚洲日本在线天堂| 国产成人精品免费| 日韩免费在线观看| 亚洲超碰97人人做人人爱| 成人黄色综合网站| 久久久久久麻豆| 免费人成精品欧美精品| 91国产福利在线| 亚洲欧洲性图库| 处破女av一区二区| 26uuu精品一区二区| 日韩精品一区第一页| 91香蕉视频污| 中文字幕第一区综合| 国内一区二区在线| 欧美一级黄色片| 午夜亚洲福利老司机| 91久久线看在观草草青青 | 久久综合色播五月| 亚洲一区精品在线| 91亚洲精品久久久蜜桃网站| 久久久久99精品一区| 麻豆精品视频在线观看视频| 精品视频一区二区不卡| 亚洲一区二区三区四区在线 | 亚洲视频每日更新| a亚洲天堂av| 欧美激情在线一区二区三区| 国产真实乱偷精品视频免| 日韩欧美在线综合网| 久久精品夜色噜噜亚洲aⅴ| 婷婷综合五月天| 久久久蜜桃精品| 国产呦萝稀缺另类资源| 欧美电视剧免费全集观看| 日韩va欧美va亚洲va久久| 91精品国产一区二区三区| 午夜久久久久久久久| 91.成人天堂一区| 青青青伊人色综合久久| 日韩欧美专区在线| 韩日av一区二区| 26uuu欧美日本| 国产麻豆成人传媒免费观看| 国产性天天综合网| 成人免费毛片片v| 一色屋精品亚洲香蕉网站| 色香蕉久久蜜桃| 午夜精品福利视频网站| 91精品国产91久久久久久一区二区 | 樱花影视一区二区| 在线中文字幕一区| 午夜精品福利一区二区三区av | 亚洲一区二区在线免费看| 一个色综合av| 91亚洲永久精品| 26uuu另类欧美| 高清不卡在线观看| 自拍偷拍国产亚洲| 欧美日韩国产三级| 久久国产尿小便嘘嘘尿| 久久久国际精品| 色呦呦日韩精品| 日韩精品一卡二卡三卡四卡无卡| 日韩精品中文字幕一区二区三区 | 6080午夜不卡| 国产中文一区二区三区| 国产精品成人免费| 欧美日韩一区二区三区四区五区| 免费黄网站欧美| 国产精品久久久久一区二区三区共 | 欧美成人一区二区三区在线观看 | 午夜伊人狠狠久久| 精品福利视频一区二区三区| 成人午夜免费视频| 午夜精品一区二区三区电影天堂| 日韩女同互慰一区二区| 欧美午夜精品一区二区蜜桃 | 午夜精品久久久| 欧美一区二区网站| 国产精品一区免费在线观看| 中文字幕在线一区| 欧美男男青年gay1069videost| 国产真实精品久久二三区| 综合久久久久久| 91精品在线免费观看| 成人激情黄色小说| 蜜臀久久久久久久| 综合在线观看色| 欧美成人bangbros| 日本高清无吗v一区| 国产一区二区不卡老阿姨| 亚洲蜜臀av乱码久久精品| 亚洲精品在线电影| 欧美老女人在线| eeuss鲁片一区二区三区| 日韩精品三区四区| 国产精品高潮呻吟| 久久青草国产手机看片福利盒子 | 亚洲妇熟xx妇色黄| 国产亚洲短视频| 91精品国产福利| 日本道精品一区二区三区 | 亚洲人成精品久久久久久 | 成人美女在线视频| 蜜桃在线一区二区三区| 亚洲久草在线视频| 国产午夜精品美女毛片视频| 91精品欧美久久久久久动漫 | 亚洲一区二区欧美日韩 | 色系网站成人免费| 国产黄色成人av| 久久成人免费日本黄色| 亚洲成人黄色影院| 亚洲欧美另类久久久精品| 国产三级三级三级精品8ⅰ区| 欧美精品在线一区二区三区| 91小视频在线观看| 粉嫩一区二区三区在线看| 国产一区在线不卡| 久久国产麻豆精品| 天堂成人免费av电影一区| 亚洲欧美激情一区二区| 久久久精品欧美丰满| 日韩午夜激情电影| 欧美日高清视频| 欧洲中文字幕精品| 色综合久久久网| av福利精品导航| 福利一区福利二区| 国产一区 二区 三区一级| 蜜桃av一区二区| 日本不卡的三区四区五区| 午夜精品久久久久久久蜜桃app| 亚洲人成伊人成综合网小说| 中国av一区二区三区| 国产欧美日韩另类视频免费观看| 久久亚洲欧美国产精品乐播| 日韩精品一区二区三区四区 | 国模娜娜一区二区三区| 蜜桃av噜噜一区二区三区小说| 日韩综合小视频| 午夜视频一区二区三区| 日韩综合一区二区| 日本免费新一区视频| 日韩国产在线一| 日本午夜精品一区二区三区电影| 风流少妇一区二区| 成人动漫中文字幕| 色综合久久99| 欧美又粗又大又爽| 欧美日本精品一区二区三区| 欧美日韩亚洲另类| 欧美一区二区成人6969| 日韩一区二区三区在线| 日韩一级二级三级| 久久你懂得1024| 国产精品毛片a∨一区二区三区 | 99re在线精品| 91美女福利视频| 色哦色哦哦色天天综合| 欧美亚洲动漫制服丝袜| 欧美日韩久久久| 欧美电影精品一区二区| 国产欧美日韩中文久久| 中文字幕在线观看一区二区| 亚洲精品免费在线|