| C语言库函数(B类字母) |
|
| 作者:未知 文章来源:网络收集 点击数: 更新时间:2006-3-29 15:22:23
|
fiers & CTRL) printf("CTRL"); if (modifiers & ALT) printf("ALT"); printf("]"); } /* print out the character read */ if (isalnum(key & 0xFF)) printf("'%c'\n", key); else printf("%#02x\n", key); return 0; }
函数名: biosmemory 功 能: 返回存储块大小 用 法:int biosmemory(void); 程序例:
#include #include
int main(void) { int memory_size;
memory_size = biosmemory(); /* returns value up to 640K */ printf("RAM size = %dK\n",memory_size); return 0; }
函数名: biosprint 功 能: 直接使用BIOS服务的打印机I/O 用 法: int biosprint(int cmd, int byte, int port); 程序例:
#include #include #include
int main(void) { #define STATUS 2 /* printer status command */ #define PORTNUM 0 /* port number for LPT1 */
int status, abyte=0;
printf("Please turn off your printer. Press any key to continue\n"); getch(); status = biosprint(STATUS, abyte, PORTNUM); if (status & 0x01) printf("Device time out.\n"); if (status & 0x08) printf("I/O error.\n");
if (status & 0x10) printf("Selected.\n"); if (status & 0x20) printf("Out of paper.\n");
if (status & 0x40) printf("Acknowledge.\n"); if (status & 0x80) printf("Not busy.\n");
return 0; }
函数名: biostime 功 能: 读取或设置BIOS时间 用 法: long biostime(int cmd, long newtime); 程序例:
#include #include #include #include
int main(void) { long bios_time;
clrscr(); cprintf("The number of clock ticks since midnight is:\r\n"); cprintf("The number of seconds since midnight is:\r\n"); cprintf("The number of minutes since midnight is:\r\n"); cprintf("The number of hours since midnight is:\r\n"); cprintf("\r\nPress any key to quit:");
上一页 [1] [2] [3] [4] [5] [6] 下一页
|
|
[ 收藏此页到: 天天|和讯|博采|ViVi|狐摘|我摘|天极 ] 文章录入:kinda 责任编辑:kinda |
|
上一篇文章: C语言库函数(A类字母) 下一篇文章: C语言库函数(C类字母) |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |