⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 com32io.h

📁 linux内核
💻 H
字号:
/* -*- c -*- ------------------------------------------------------------- * *    *   Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved * *   This program is free software; you can redistribute it and/or modify *   it under the terms of the GNU General Public License as published by *   the Free Software Foundation, Inc., 53 Temple Place Ste 330, *   Boston MA 02111-1307, USA; either version 2 of the License, or *   (at your option) any later version; incorporated herein by reference. * * ----------------------------------------------------------------------- */#ifndef __COM32IO_H__#define __COM32IO_H__#include <com32.h>#ifndef NULL#define NULL ((void *)0)#endif/* BIOS Assisted output routines */void cswprint(const char *str, char attr, char left); // Print a C str (NUL-terminated) respecting the left edge of window// i.e. \n in str will move cursor to column left// Print a C str (NUL-terminated)static inline void csprint(const char *str, char attr){  cswprint(str,attr,0);}void cprint(char chr,char attr,unsigned int times, char disppage); // Print a char void setdisppage(char num); // Set the display page to specified numberchar getdisppage(); // Get current display page void gotoxy(char row,char col, char page);void getpos(char * row, char * col, char page);char inputc(char * scancode); // Return ASCII char by val, and scancode by referencestatic inline void putch(char x, char attr, char page){    cprint(x,attr,1,page);}void setcursorshape(char start,char end); // Set cursor shapevoid getcursorshape(char *start,char *end); // Get shape for current page// Get char displayed at current position in specified pageunsigned char getcharat(char page); static inline void cursoroff(void) /* Turns off cursor */{   setcursorshape(32,33);}static inline void cursoron(void) /* Turns on cursor */{   setcursorshape(6,7);}static inline unsigned char readbiosb(unsigned int ofs){   return *((unsigned char *)MK_PTR(0,ofs));}static inline char getnumrows(){    return readbiosb(0x484); // Actually numrows - 1}static inline char getnumcols(void){    return readbiosb(0x44a); // Actually numcols}void scrollup(); //Scroll up display screen by one line void setvideomode(char mode); // Set the video mode.unsigned char sleep(unsigned int msec); // Sleep for specified timevoid beep(); // A Bellunsigned char checkkbdbuf(); // Check to see if there is kbd buffer is non-empty?static inline void clearkbdbuf()   // Clear the kbd buffer (how many chars removed?){    while (checkkbdbuf()) inputc(NULL);} #endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -