Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <bios.h>
    unsigned short _bios_printer( unsigned service,
                                  unsigned port,
                                  unsigned data );

Description:
    The _bios_printer function uses INT 0x17 to perform printer output
    services to the printer specified by port.  The values for service are:

    _PRINTER_WRITE
        Sends the low-order byte of data to the printer specified by port.

    _PRINTER_INIT
        Initializes the printer specified by port.

    _PRINTER_STATUS
        Get the status of the printer specified by port.


Returns:
    The _bios_printer function returns a printer status byte defined as
    follows:

    bit 0 (0x01)
        Printer timed out

    bits 1-2
        Unused

    bit 3 (0x08)
        I/O error

    bit 4 (0x10)
        Printer selected

    bit 5 (0x20)
        Out of paper

    bit 6 (0x40)
        Printer acknowledge

    bit 7 (0x80)
        Printer not busy


Example:
    #include <stdio.h>
    #include <bios.h>

    void main()
      {
        unsigned short status;

        status = _bios_printer( _PRINTER_STATUS, 1, 0 );
        printf( "Printer status: 0x%2.2X\n", status );
      }

Classification:
    BIOS

Systems:
    DOS, Win, NT, DOS/PM

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