biosprint
函数名: biosprint
功 能: 直接使用BIOS服务的打印机I/O
用 法: int biosprint(int cmd, int byte, int port);
程序例:
#include <stdio.h>
#include <conio.h>
#include <bios.h>
int main(void)
{
#define STATUS 2 /* printer status command */
#define PORTNUM 0 /* port number for LPT1 */
int status, abyte=0;
printf("Please turn off your printer. Press any key to continue
");
getch();
status = biosprint(STATUS, abyte, PORTNUM);
if (status & 0x01)
printf("Device time out.
");
if (status & 0x08)
printf("I/O error.
");
if (status & 0x10)
printf("Selected.
");
if (status & 0x20)
printf("Out of paper.
");
if (status & 0x40)
printf("Acknowledge.
");
if (status & 0x80)
printf("Not busy.
");
return 0;
}