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

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

?? pc.c

?? UCOS-2.rar
?? 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
*********************************************************************************************************
*/

//change by cmj
#include "config.h"
//#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;          //del by cmj 
//static BOOLEAN   PC_ExitFlag;         //del by cmj
//void           (*PC_TickISR)(void);   //del by cmj

/*$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 Uart_SendChar(INT8U data)
{
    while((U0LSR & 0x00000020) == 0);
    U0THR = data;
}		

//change by cmj
        void PC_DispChar (INT8U x, INT8U y, INT8U c, INT8U color)
{
    //OS_ENTER_CRITICAL();
    OSSchedLock();
    
    Uart_SendChar(0xff);
    Uart_SendChar(x);
    Uart_SendChar(y);
    Uart_SendChar(c);
    Uart_SendChar(color);
  
    //OS_EXIT_CRITICAL();
    OSSchedUnlock();
}

//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
*********************************************************************************************************
*/
//change by cmj
        void PC_DispClrCol (INT8U x, INT8U color)
{
    INT8U      i;

    for (i = 0; i < DISP_MAX_Y; i++)
    {
        PC_DispChar(x, i, ' ', color);
    }
}

//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
*********************************************************************************************************
*/
//change by cmj
        void PC_DispClrRow (INT8U y, INT8U color)
{
    INT8U      i;

    for (i = 0; i < DISP_MAX_X; i++)
    {
        PC_DispChar(i, y, ' ', color);
    }
}

//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
*********************************************************************************************************
*/
//change by cmj
        void PC_DispClrScr (INT8U color)
{
    INT16U      i,j;

    for (i = 0; i < DISP_MAX_Y; i++)
    {
        for (j = 0; j < DISP_MAX_X; j++)
        {
            PC_DispChar(j, i, ' ', color);
        }
    }
}

//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
*********************************************************************************************************
*/
//change by cmj
        void PC_DispStr (INT8U x, INT8U y, const char *s, INT8U color)
{
    while (*s)
    {
        if (x >= DISP_MAX_X)
        {
            x = 0;
            y++;
        }
        PC_DispChar(x, y, *s++, color);
        x++;
    }
}

//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
*********************************************************************************************************
*/
//change by cmj
        void PC_DOSReturn (void)
{
    Reset();
}

//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)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久国产精品厨房| 91免费看视频| 日韩美女视频19| 久久久精品影视| 久久伊人蜜桃av一区二区| 欧美日韩高清一区| 欧美视频一区在线| 91视频在线看| 色av成人天堂桃色av| 91国偷自产一区二区使用方法| eeuss鲁片一区二区三区在线看| 成人av高清在线| 91影院在线免费观看| 99国产精品国产精品毛片| 国产91色综合久久免费分享| 粉嫩一区二区三区性色av| 成人短视频下载| 色国产精品一区在线观看| 欧美在线你懂得| 91麻豆精品国产自产在线观看一区| 欧美日韩小视频| 欧美一区二区视频在线观看2022| 欧美日本一区二区三区| 日韩一区二区在线免费观看| 精品国产网站在线观看| 国产婷婷一区二区| 国产精品久线在线观看| 一区二区三区在线视频免费 | zzijzzij亚洲日本少妇熟睡| 高清不卡一区二区| 色欧美片视频在线观看在线视频| 色爱区综合激月婷婷| 日韩一区二区在线观看| 国产午夜精品一区二区| 亚洲色图在线播放| 天堂一区二区在线| 国产成人精品免费在线| 在线观看视频一区二区| 717成人午夜免费福利电影| 久久综合九色综合久久久精品综合 | 亚洲欧洲av在线| 亚洲国产精品自拍| 国产很黄免费观看久久| 欧美伊人久久大香线蕉综合69| 日韩午夜三级在线| 亚洲视频免费看| 久久国产乱子精品免费女| 成人91在线观看| 日韩免费在线观看| 伊人一区二区三区| 国产精品1024| 欧美嫩在线观看| 国产精品久久久久一区| 蜜桃在线一区二区三区| 99精品视频在线观看免费| 欧美成人a∨高清免费观看| 亚洲免费电影在线| 国产91精品露脸国语对白| 欧美视频你懂的| 亚洲视频免费在线| 高清成人免费视频| 欧美一区二区私人影院日本| 亚洲国产精品久久久男人的天堂| 国产精品一区三区| 日韩视频不卡中文| 午夜影视日本亚洲欧洲精品| 91蜜桃免费观看视频| 久久日一线二线三线suv| 三级久久三级久久| 欧美视频一区二| 亚洲一区二区在线免费观看视频 | 亚洲欧美激情在线| 成人av免费观看| 国产嫩草影院久久久久| 狠狠色狠狠色综合系列| 777久久久精品| 爽爽淫人综合网网站| 欧美艳星brazzers| 亚洲图片有声小说| 在线观看不卡视频| 亚洲一区二区视频| 色菇凉天天综合网| 亚洲国产乱码最新视频| 欧美日韩成人在线| 婷婷开心激情综合| 日韩午夜av电影| 久久国产精品第一页| 制服丝袜亚洲精品中文字幕| 青青草国产成人av片免费| 91精品国产日韩91久久久久久| 日韩精品电影一区亚洲| 精品剧情v国产在线观看在线| 久久国产精品露脸对白| 国产欧美中文在线| 91丝袜美腿高跟国产极品老师 | 91丝袜国产在线播放| 亚洲乱码国产乱码精品精可以看| 91亚洲资源网| 亚洲国产中文字幕| 精品久久一区二区三区| 成人av中文字幕| 一区二区三区在线高清| 制服丝袜中文字幕一区| 激情六月婷婷久久| 1024亚洲合集| 欧美人牲a欧美精品| 激情文学综合网| 亚洲色图在线视频| 欧美一区二区精美| 成人免费毛片a| 亚洲午夜一二三区视频| 91精品国产综合久久精品app| 国产制服丝袜一区| 夜夜嗨av一区二区三区网页| 日韩一级黄色大片| 91在线视频免费观看| 日韩av中文字幕一区二区三区| 26uuuu精品一区二区| 色综合久久久久久久久| 久久国产婷婷国产香蕉| 亚洲精品国久久99热| 精品国产三级电影在线观看| 91看片淫黄大片一级| 久久99久久久欧美国产| 亚洲女厕所小便bbb| 久久综合av免费| 欧美日韩美女一区二区| 大陆成人av片| 久久99精品国产91久久来源| 亚洲你懂的在线视频| 久久久亚洲高清| 欧美精品精品一区| 99国产精品久| 国产成a人亚洲精品| 美女久久久精品| 一区二区三区资源| 欧美国产欧美综合| 精品日韩欧美在线| 91精品在线免费观看| 色婷婷国产精品综合在线观看| 国产xxx精品视频大全| 日韩av电影免费观看高清完整版| 国产精品美女www爽爽爽| 精品国产a毛片| 欧美一区二区三区在线| 欧美在线观看视频一区二区 | 亚洲精品美国一| 中文av字幕一区| 久久蜜桃av一区精品变态类天堂| 欧美男同性恋视频网站| 欧美日韩国产综合草草| 在线观看中文字幕不卡| av电影一区二区| 成人a区在线观看| 国产成人aaa| 国产一区二区毛片| 国产一区二区三区在线观看免费视频 | 国产精品无人区| 欧美激情一区二区三区全黄| 欧美电影免费观看高清完整版在线| 欧美人动与zoxxxx乱| 精品视频在线看| 欧美剧在线免费观看网站| 欧美亚洲精品一区| 91福利国产精品| 欧美日韩国产片| 日韩三级中文字幕| 久久综合狠狠综合久久综合88 | www.亚洲色图.com| 91免费国产视频网站| 97精品视频在线观看自产线路二| 99re8在线精品视频免费播放| 北条麻妃国产九九精品视频| 91香蕉视频在线| 欧美精品aⅴ在线视频| 亚洲精品一区二区三区精华液 | 国产一区美女在线| 99久久精品99国产精品| 欧美私模裸体表演在线观看| 7777精品伊人久久久大香线蕉完整版 | 欧美视频三区在线播放| 日韩视频一区二区| 国产色综合一区| 亚洲小说春色综合另类电影| 免费一级片91| 97aⅴ精品视频一二三区| 欧美日韩国产一级片| 欧美性猛交xxxxxxxx| 欧美丝袜丝交足nylons| 久久电影网电视剧免费观看| 久久国产精品99久久人人澡| 久久激情综合网| 国产成人精品亚洲午夜麻豆| 免费日本视频一区| 久久99久久99小草精品免视看| 蜜桃91丨九色丨蝌蚪91桃色| 国产乱色国产精品免费视频| 在线看国产一区二区| 欧美日韩亚洲丝袜制服| 精品动漫一区二区三区在线观看|