欢迎来到天天文库
浏览记录
ID:33877792
大小:330.18 KB
页数:125页
时间:2019-02-28
《c语言库函数 一些c 16 位使用的库函数》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、函数名:parsfnm功能:分析文件名用法:char*parsfnm(char*cmdline,structfcb*fcbptr,intoption);程序例:#include#include#include#includeintmain(void){charline[80];structfcbblk;/*getfilename*/printf("Enterdriveandfilename(nopath-ie.a:file.dat)
2、");gets(line);/*putfilenameinfcb*/if(parsfnm(line,&blk,1)==NULL)printf("Errorinparsfmcall");elseprintf("Drive#%dName:%11s",blk.fcb_drive,blk.fcb_name);return0;}函数名:peek功能:检查存储单元用法:intpeek(intsegment,unsignedoffset);程序例:#include#include
3、#includeintmain(void){intvalue=0;printf("Thecurrentstatusofyourkeyboardis:");value=peek(0x0040,0x0017);if(value&1)printf("Rightshifton");elseprintf("Rightshiftoff");if(value&2)printf("Leftshifton");elseprintf("Leftshiftoff");if(value&4)prin
4、tf("Controlkeyon");elseprintf("Controlkeyoff");if(value&8)printf("Altkeyon");elseprintf("Altkeyoff");if(value&16)printf("Scrolllockon");elseprintf("Scrolllockoff");if(value&32)printf("Numlockon");elseprintf("Numlockoff");if(value&64)printf("
5、Capslockon");elseprintf("Capslockoff");return0;}函数名:peekb功能:检查存储单元用法:charpeekb(intsegment,unsignedoffset);程序例:#include#include#includeintmain(void){intvalue=0;printf("Thecurrentstatusofyourkeyboardis:");value=peekb(0x0040,0x00
6、17);if(value&1)printf("Rightshifton");elseprintf("Rightshiftoff");if(value&2)printf("Leftshifton");elseprintf("Leftshiftoff");if(value&4)printf("Controlkeyon");elseprintf("Controlkeyoff");if(value&8)printf("Altkeyon");elseprintf("Altkeyoff")
7、;if(value&16)printf("Scrolllockon");elseprintf("Scrolllockoff");if(value&32)printf("Numlockon");elseprintf("Numlockoff");if(value&64)printf("Capslockon");elseprintf("Capslockoff");return0;}函数名:perror功能:系统错误信息用法:voidperror(char*string);程序例:#inclu
8、deintmain(void){FILE*fp;fp=fopen("perror.dat","r");if(!fp)perror("Unabletoopenfileforreading");return0;}函数名:pieslice功能:绘制并填充一个扇形用法:voidfarpieslice(intx,intstanle,intendangle,intradius);程序例:#in
此文档下载收益归作者所有