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

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

?? pc.c

?? 在ATmega16芯片上移植的ucosii系統(tǒng)
?? 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          */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区免费| 怡红院av一区二区三区| 另类欧美日韩国产在线| 制服丝袜国产精品| 日韩电影免费一区| 欧美电影免费观看高清完整版在 | 一区二区三区四区不卡在线 | 午夜视频一区二区| 欧美裸体一区二区三区| 麻豆91精品视频| 久久综合色一综合色88| 国产精品影视网| 中文字幕日韩一区| 91美女蜜桃在线| 日韩制服丝袜先锋影音| 久久久久97国产精华液好用吗| 不卡一区在线观看| 一区二区三区产品免费精品久久75 | 久久久一区二区三区| 国产精品亚洲综合一区在线观看| 国产精品久久午夜| 91福利精品视频| 久久福利视频一区二区| 亚洲国产精品成人综合色在线婷婷| 91国偷自产一区二区三区观看| 日韩 欧美一区二区三区| 国产亚洲精品超碰| 91麻豆国产香蕉久久精品| 午夜精品久久久久久久99樱桃| 久久众筹精品私拍模特| 99久久国产免费看| 免费在线观看一区二区三区| **欧美大码日韩| 欧美xxxxxxxxx| 91免费看`日韩一区二区| 免费高清不卡av| 亚洲欧美日韩在线不卡| 精品成a人在线观看| 欧美影片第一页| 国产激情一区二区三区| 日韩成人dvd| 国产精品久久久久久久浪潮网站 | 亚洲国产va精品久久久不卡综合| 欧美成人video| 在线视频欧美区| 高清在线不卡av| 麻豆视频观看网址久久| 伊人一区二区三区| 亚洲国产精品二十页| 精品国内二区三区| 欧美日产国产精品| 欧美中文字幕亚洲一区二区va在线 | 午夜精品一区二区三区免费视频| 日韩女同互慰一区二区| 欧美午夜宅男影院| 波多野结衣中文一区| 国产一区在线观看视频| 日产国产高清一区二区三区| 亚洲综合在线视频| 最新日韩av在线| 国产精品毛片高清在线完整版| 精品久久人人做人人爱| 在线播放/欧美激情| 欧美日韩国产不卡| 欧美三级视频在线观看| 97se亚洲国产综合在线| 国产99久久久国产精品潘金网站| 美女视频网站黄色亚洲| 天天综合色天天综合| 亚洲香肠在线观看| 亚洲狠狠爱一区二区三区| 一区二区三区中文在线观看| 中文字幕一区二区在线播放| 国产精品欧美经典| 亚洲国产精品av| 国产精品久久二区二区| 国产精品久久久久影院| 1区2区3区国产精品| 亚洲视频电影在线| 亚洲综合在线第一页| 一区二区三区色| 亚洲成av人片一区二区梦乃| 天天综合网天天综合色| 老司机精品视频一区二区三区| 裸体健美xxxx欧美裸体表演| 日韩avvvv在线播放| 久久er精品视频| 国产一区二区不卡| 成人av在线播放网站| 一本到高清视频免费精品| 欧美亚洲国产bt| 制服丝袜一区二区三区| 26uuu国产日韩综合| 欧美激情资源网| 亚洲精品国产无套在线观| 午夜不卡在线视频| 久久99精品久久久久久 | 99v久久综合狠狠综合久久| 色综合久久99| 91精品综合久久久久久| 欧美videossexotv100| 久久午夜电影网| 中文字幕在线播放不卡一区| 亚洲成人综合网站| 老色鬼精品视频在线观看播放| 国产一区二区三区观看| 99re这里都是精品| 欧美日韩精品欧美日韩精品一综合| 91麻豆精品国产自产在线观看一区 | 欧美一区日韩一区| 久久久亚洲高清| 国产精品三级在线观看| 亚洲制服丝袜av| 精久久久久久久久久久| 91亚洲国产成人精品一区二三| 欧美男生操女生| 中文字幕国产一区| 亚洲成va人在线观看| 国产精品一区一区| 欧美色爱综合网| 欧美极品美女视频| 五月天激情综合| 从欧美一区二区三区| 欧美日韩精品系列| 国产精品国产三级国产专播品爱网| 亚洲电影在线免费观看| 国产精品77777竹菊影视小说| 在线观看免费亚洲| 欧美激情一二三区| 蜜桃视频在线一区| 91黄色在线观看| 久久九九久精品国产免费直播| 亚洲一二三级电影| 成人看片黄a免费看在线| 日韩欧美成人一区| 一区二区三区在线观看网站| 国产一区二区精品在线观看| 欧美精品777| 亚洲精品成人a在线观看| 丁香六月久久综合狠狠色| 欧美一三区三区四区免费在线看| 国产精品福利一区| 国产成人免费网站| 欧美一区二区在线免费播放 | 香蕉av福利精品导航| a在线播放不卡| 久久综合色鬼综合色| 五月综合激情网| 色婷婷综合激情| 亚洲欧洲无码一区二区三区| 国产精品99久| 日韩精品自拍偷拍| 亚洲韩国精品一区| 色欧美日韩亚洲| 国产精品第一页第二页第三页| 国产精品996| 久久精品在线观看| 国产麻豆午夜三级精品| 日韩视频永久免费| 日韩va亚洲va欧美va久久| 欧美视频一区二区三区在线观看| 亚洲三级电影全部在线观看高清| 国产精一区二区三区| 久久精品人人做人人综合| 久久99精品久久久| 久久久国产一区二区三区四区小说| 精品一区二区三区不卡| 欧美一级理论片| 麻豆国产精品一区二区三区| 91精品国产全国免费观看| 蜜臀久久99精品久久久久久9| 日韩欧美国产成人一区二区| 秋霞成人午夜伦在线观看| 欧美一区午夜视频在线观看 | 一区二区激情小说| 日本精品一区二区三区高清| 亚洲精品乱码久久久久久久久| 91麻豆精品视频| 亚洲综合自拍偷拍| 欧美精品一级二级| 老司机午夜精品99久久| 国产三级三级三级精品8ⅰ区| 国产美女av一区二区三区| 国产精品乱码人人做人人爱| av毛片久久久久**hd| 一区二区三区在线视频观看58| 欧美人与禽zozo性伦| 蜜臀av性久久久久蜜臀av麻豆| 欧美不卡在线视频| 国产成人啪免费观看软件| 1区2区3区国产精品| 欧美日韩国产片| 激情图片小说一区| 中文字幕一区免费在线观看| 欧美亚洲自拍偷拍| 久久精品国产99| 中文字幕一区二区三区在线观看| 欧洲日韩一区二区三区| 日本三级亚洲精品| 国产午夜精品福利|