Question : Problem: Data Communication through parallel port

How do I program data communication thruogh parallel port
In DOS, C or assemble are OK
If has sample code is better

Answer : Problem: Data Communication through parallel port

Use interrupt 17h

void InitPrinter (int printer)
{
union REGS register;

register.h.ah=1;
register.x.dx=printer;
int86(0x17,®ister,®ister);
}

sendbyte(int printer,unsigned char byte)
{
union REGS register;

register.h.ah=0;
register.l.al=byte;
register.x.dx=printer;
int86(0x17,®ister,®ister);
}

int getstatus(int printer)
{
union REGS register;

register.h.ah=1;
register.x.dx=printer;
int86(0x17,®ister,®ister);
return ((int)register.h.ah));
}

Random Solutions  
 
programming4us programming4us