vgablank.c

来自「国外网站上的一些精典的C程序」· C语言 代码 · 共 38 行

C
38
字号
/***  Functions to blank and resore EGA/VGA screens*/#include <dos.h>#include "pchwio.h"#include "vgablank.h"void blank_EVGA(void){	disable();	inp(0x3da);	outp(0x3c0, 0);	enable();}void restore_EVGA(void){	disable();	inp(0x3da);	outp(0x3c0, 0x20);	enable();}#ifdef TEST#include "delay.h"      /* From SNIPPETS - use dos.h if your compiler's                           standard library supports delay().           */main(){      blank_EVGA();     /* Blank the screen...  */      delay(1500);      /* ...delay 1.5 secs... */      restore_EVGA();   /* ...& restore it      */      return 0;}#endif /* TEST */

⌨️ 快捷键说明

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