PRINTCHK.C
资源名称:C.rar [点击查看]
上传用户:qq5388545
上传日期:2022-07-04
资源大小:29849k
文件大小:1k
源码类别:
界面编程
开发平台:
C/C++
- #include <bios.h>
- #include <conio.h>
- #include <stdio.h>
- void main (void)
- {
- int status = 0;
- int old_status = 0;
- do
- {
- status = biosprint(2, 0, 0); // Read LPT1
- if (status != old_status)
- {
- if (status & 1)
- printf ("Time-outt");
- if (status & 8)
- printf ("Output Errort");
- if (status & 16)
- printf ("Printer Selectedt");
- if (status & 32)
- printf ("Out of Papert");
- if (status & 64)
- printf ("Acknowledget");
- if (status & 128)
- printf ("Printer Not Busy");
- printf ("n");
- old_status = status;
- }
- }
- while (! kbhit());
- }