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 Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <dos.h>
    int bdos( int dos_func, unsigned dx, unsigned char al );

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 bdos function returns the value of the AX register after the
    interrupt has completed.

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, Windows, Win386, DOS/PM

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

See Also: int386 int386x

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