Monday, June 9, 2008

lptout in c - linux

#include 
#include
#include
#include /* tempat io.h */

#define base 0x378 /* printer port base address */
#define value 255 /* numeric value to send to printer port */

main(int argc, char **argv)
{
if (ioperm(base,1,1))
fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);

outb(value, base);
}

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home