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:
    int bdos( int dos_func, unsigned dx, unsigned char al );
    #include <dos.h>

Description:
    The bdos function causes the computer's central processor (CPU) to be
    interrupted with an interrupt number hexadecimal 21 (0x21), which is a
    request to invoke a specific DOS function.  Before the interrupt, the DX
    register is loaded from dx, the AH register is loaded with the DOS
    function number from dos_func and the AL register is loaded from al.
     The remaining registers are passed unchanged to DOS.

    You should consult the technical documentation for the DOS operating
    system you are using to determine the expected register contents before
    and after the interrupt in question.

Returns:
    The function returns the value of the AX register after the interrupt
    has completed.

See Also:
    int386, int386x, int86, int86x, intdos, intdosx, intr, segread

Example:
    #include <dos.h>

    #define DISPLAY_OUTPUT  2

    void main()
      {
        int rc;

        rc = bdos( DISPLAY_OUTPUT, 'B', 0 );
        rc = bdos( DISPLAY_OUTPUT, 'D', 0 );
        rc = bdos( DISPLAY_OUTPUT, 'O', 0 );
        rc = bdos( DISPLAY_OUTPUT, 'S', 0 );
      }

Classification:
    DOS

Systems:
    DOS, Win, NT, DOS/PM

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