Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>biosprint() printer i/o</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
biosprint()              Printer I/O

 include    <bios.h>

 int        biosprint(cmd,byte,port);
 int        cmd;                         Operation to perform
 int        byte;                        Byte value
 int        port;                        Port

    biosprint() performs various printer functions on the printer
    identified by 'port'.

    'cmd' specifies one of the following operations to be performed:

                0   Print the character in 'byte'
                1   Initialize the printer port
                2   Read the printer status

    The value of 'byte' can be 0 to 255.

    A 'port' value of 0 corresponds to LPT1, a 'port' value of 1
    corresponds to LPT2, etc.

    Returns:    The current printer status composed by ORing these bit
                values together:

                    0x01 Device time out
                    0x08 I/0 error
                    0x10 Selected
                    0x20 Out of paper
                    0x40 Acknowledge
                    0x80 Not busy

                If 'cmd' is set to 0, a return value of 'device time out'
                indicates an output error.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson