#include #include #include #define PRINTER 0x17 //BIOS printer port #define LPT1 0x00 //LPT1, your first printer #define EJECT 0x0c //Eject page printer command void eject(); void prnchar(char c); void main() { printf("Please ensure that your printer is on and ready to print.\n"); printf("Press Enter:"); getch(); /* Now eject a page from the printer */ eject(); } void eject(void) { prnchar(EJECT); } void prnchar(char c) { union REGS regs; regs.h.ah=0x00; //print character function regs.h.al=c; //character to print regs.x.dx=LPT1; //printer port to print to int86(PRINTER,®s,®s); }