Printchk.c
上传用户:dq031136
上传日期:2022-08-08
资源大小:802k
文件大小:1k
- #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());
- }