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

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

?? pc.c

?? 本程序是關于ucos上的任務調度的一個程序
?? 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                 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩三级伦理片妻子的秘密按摩| 亚洲精品成人在线| 国产精品久久久久久久久晋中 | caoporm超碰国产精品| 欧美日韩中文国产| 日韩美女久久久| 国产伦精品一区二区三区在线观看| 色播五月激情综合网| 国产日韩在线不卡| 国内精品久久久久影院一蜜桃| 在线观看av一区| 中文字幕欧美激情| 国产乱人伦偷精品视频不卡| 欧美美女网站色| 亚洲最新视频在线播放| 成人国产精品免费网站| 久久精品一区八戒影视| 毛片基地黄久久久久久天堂| 欧美色综合网站| 亚洲永久精品国产| 色综合久久综合| 一区在线中文字幕| 不卡av免费在线观看| 久久久久国产精品麻豆ai换脸 | 国产精品系列在线观看| 精品国产一区久久| 免费看黄色91| 欧美一区二区三区爱爱| 五月激情六月综合| 欧美乱熟臀69xxxxxx| 亚洲国产综合91精品麻豆| 一本到不卡免费一区二区| 综合婷婷亚洲小说| 91色婷婷久久久久合中文| 成人免费在线播放视频| 色哟哟国产精品| 亚洲欧美经典视频| 91色乱码一区二区三区| 亚洲精品国产a| 欧美午夜精品免费| 奇米影视一区二区三区| 欧美一级精品在线| 国产精品一区二区免费不卡| 精品美女被调教视频大全网站| 狠狠色丁香婷综合久久| 国产日韩精品一区二区浪潮av| 国产成人综合精品三级| 亚洲欧美日韩一区二区三区在线观看| 91蜜桃免费观看视频| 亚洲午夜在线视频| 欧美tickling挠脚心丨vk| 国产精品乡下勾搭老头1| 国产精品入口麻豆原神| 在线一区二区视频| 蜜臀av一区二区| 国产清纯美女被跳蛋高潮一区二区久久w | 国产一区二区三区视频在线播放| 久久精品欧美日韩精品| 99re这里只有精品首页| 日韩影院在线观看| 国产视频一区二区在线| 欧美在线免费观看视频| 韩国av一区二区| 亚洲黄色录像片| 欧美电影免费观看高清完整版在线 | 制服丝袜中文字幕一区| 国内精品久久久久影院薰衣草 | 国产日韩欧美电影| 欧美日韩亚洲丝袜制服| 国产精品99久久久久久宅男| 亚洲色图欧美在线| 3atv在线一区二区三区| 99视频精品全部免费在线| 午夜精品福利在线| 国产精品国产三级国产aⅴ原创| 欧美三级蜜桃2在线观看| 国产一区二区在线影院| 亚洲制服欧美中文字幕中文字幕| 久久综合九色综合欧美就去吻| 91视频在线观看| 国产成人精品影视| 麻豆一区二区99久久久久| 自拍偷拍亚洲欧美日韩| 国产婷婷色一区二区三区四区| 欧美色倩网站大全免费| 99久久精品一区二区| 国产一区二区三区四区在线观看| 亚洲一区影音先锋| 中文字幕综合网| 日本一区二区三区电影| 日韩欧美色综合| 色综合视频在线观看| 国产成人av电影| 精品一区二区av| 天天色天天操综合| 亚洲一区二区三区三| 亚洲女子a中天字幕| 国产日韩成人精品| 久久精品综合网| 精品sm捆绑视频| 精品剧情v国产在线观看在线| 欧美日韩另类一区| 欧美亚洲国产bt| 日本高清成人免费播放| 91视频在线看| 91久久一区二区| 91视频一区二区| 99riav久久精品riav| 99在线热播精品免费| 成人性生交大合| 成人午夜又粗又硬又大| 成人激情图片网| 99免费精品视频| 色综合天天综合网国产成人综合天| 麻豆一区二区三| 水野朝阳av一区二区三区| 亚洲福利电影网| 亚洲不卡av一区二区三区| 亚洲www啪成人一区二区麻豆| 亚洲五码中文字幕| 亚洲成a人在线观看| 天堂一区二区在线| 另类的小说在线视频另类成人小视频在线| 亚洲国产精品精华液网站| 亚洲大型综合色站| 日韩国产精品91| 九色综合狠狠综合久久| 国产在线精品不卡| 国产99久久久精品| 在线欧美一区二区| 欧美一区二区三区白人| 久久综合色8888| 中文字幕精品—区二区四季| 亚洲男人的天堂一区二区| 亚洲福利一二三区| 精品一区二区三区久久久| 国产成人亚洲综合a∨婷婷图片| 成人精品电影在线观看| 欧美日韩视频在线一区二区| 日韩精品一区二区三区swag| 国产精品美女久久久久aⅴ| 亚洲一区二区高清| 久久av资源网| 色中色一区二区| 91精品国产综合久久精品| 国产亚洲精品超碰| 亚洲一级不卡视频| 黄色日韩网站视频| 日本韩国精品一区二区在线观看| 欧美高清视频在线高清观看mv色露露十八| 91精品国产综合久久久久久| 国产日韩精品久久久| 亚洲一区二区成人在线观看| 国产电影精品久久禁18| 欧美日韩免费观看一区二区三区| 欧美一区2区视频在线观看| 欧美国产日韩a欧美在线观看| 亚洲一区欧美一区| 成人h精品动漫一区二区三区| 欧美日韩免费电影| 国产精品午夜免费| 极品少妇xxxx偷拍精品少妇| 色久综合一二码| 国产亚洲综合在线| 日本视频中文字幕一区二区三区| eeuss影院一区二区三区| 日韩色视频在线观看| 亚洲猫色日本管| 福利电影一区二区| 久久男人中文字幕资源站| 亚洲福利视频三区| 色婷婷狠狠综合| 中文在线一区二区| 国产麻豆精品久久一二三| 91精品国产一区二区| 亚洲国产成人av网| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 国产精品一区二区久久精品爱涩| 欧美亚洲动漫另类| 亚洲精品成人悠悠色影视| 国产激情一区二区三区桃花岛亚洲| 91精品国产黑色紧身裤美女| 亚洲第一综合色| 欧美亚洲另类激情小说| 亚洲精品视频免费观看| av高清不卡在线| 国产精品丝袜久久久久久app| 国产毛片精品国产一区二区三区| 欧美高清视频不卡网| 一区二区三区久久久| 色欲综合视频天天天| 亚洲欧美另类久久久精品| k8久久久一区二区三区| 国产亚洲一区二区三区| 国产精品中文字幕日韩精品| 久久久久久免费| 国产不卡视频在线播放| 国产欧美va欧美不卡在线| 国产99久久精品| 国产精品激情偷乱一区二区∴|