资源预览内容
第1页 / 共5页
第2页 / 共5页
第3页 / 共5页
第4页 / 共5页
第5页 / 共5页
亲,该文档总共5页全部预览完了,如果喜欢就下载吧!
资源描述
C语言函数大全(p开头)功 能: 分析文件名用 法: char *parsfnm (char *cmdline, struct fcb *fcbptr, int option);程序例:#include#include#include#includeint main(void)char line80;struct fcb blk;/* get file name */printf(“Enter drive and file name (no path - ie. a:file.dat)n“);gets(line);/* put file name in fcb */if (parsfnm(line,elseprintf(“Drive #%d Name: %11sn“, blk.fcb_drive, blk.fcb_name);return 0; 函数名: peek功 能: 检查存储单元用 法: int peek(int segment, unsigned offset);程序例:#include#include#includeint main(void)int value = 0;printf(“The current status of your keyboard is:n“);value = peek(0x0040, 0x0017);if (valueelseprintf(“Right shift offn“);if (valueelseprintf(“Left shift offn“);if (valueelseprintf(“Control key offn“);if (valueelseprintf(“Alt key offn“);if (valueelseprintf(“Scroll lock offn“);if (valueelseprintf(“Num lock offn“);if (valueelseprintf(“Caps lock offn“);return 0; 函数名: peekb功 能: 检查存储单元用 法: char peekb (int segment, unsigned offset);程序例:#include#include#includeint main(void)int value = 0;printf(“The current status of your keyboard is:n“);value = peekb(0x0040, 0x0017);if (valueelseprintf(“Right shift offn“);if (valueelseprintf(“Left shift offn“);if (valueelseprintf(“Control key offn“);if (valueelseprintf(“Alt key offn“);if (valueelseprintf(“Scroll lock offn“);if (valueelseprintf(“Num lock offn“);if (valueelseprintf(“Caps lock offn“);return 0;
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号