| C语言库函数(B类字母) |
|
| 作者:未知 文章来源:网络收集 点击数: 更新时间:2006-3-29 15:22:23
|
tterns */ for (i=EMPTY_FILL; i{ /* set the fill style */ setfillstyle(i, getmaxcolor());
/* draw the 3-d bar */ bar3d(midx-50, midy-50, midx+50, midy+50, 10, 1);
getch(); }
/* clean up */ closegraph(); return 0; }
函数名: bdos 功 能: DOS系统调用 用 法: int bdos(int dosfun, unsigned dosdx, unsigned dosal); 程序例:
#include #include
/* Get current drive as 'A', 'B', ... */ char current_drive(void) { char curdrive;
/* Get current disk as 0, 1, ... */ curdrive = bdos(0x19, 0, 0); return('A' + curdrive); }
int main(void) { printf("The current drive is %c:\n", current_drive()); return 0; }
函数名: bdosptr 功 能: DOS系统调用 用 法: int bdosptr(int dosfun, void *argument, unsigned dosal); 程序例:
#include #include #include #include #include #include
#define BUFLEN 80
int main(void) { char buffer[BUFLEN]; int test;
printf("Enter full pathname of a directory\n"); gets(buffer);
test = bdosptr(0x3B,buffer,0); if(test) { printf("DOS error message: %d\n", errno); /* See errno.h for error listings */ exit (1); }
getcwd(buffer, BUFLEN); printf("The current directory is: %s\n", buffer);
return 0; }
函数名: bioscom 功 能: 串行I/O通信 用 法: int bioscom(int cmd, char abyte, int port); 程序例:
#include #include
#define COM1 0 #define DATA_READY 0x100 #define TRUE 1 #define FALSE 0
#define SETTINGS ( 0x80 | 0x02 | 0x00 | 0x00)
int main(void) { int in, out, status, DONE = FALSE;
bioscom(0, SETTINGS, COM1); cprintf("... BIOSCOM [ESC] to exit ...上一页 [1] [2] [3] [4] [5] [6] 下一页
|
|
[ 收藏此页到: 天天|和讯|博采|ViVi|狐摘|我摘|天极 ] 文章录入:kinda 责任编辑:kinda |
|
上一篇文章: C语言库函数(A类字母) 下一篇文章: C语言库函数(C类字母) |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |