Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>bdos</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
bdos
====

Syntax
------

     #include <dos.h>
     
     int bdos(int func, unsigned dx, unsigned al);

Description
-----------

Calls function FUNC of the software interrupt 0x21, passing it AL as
the subfunction and (the lower 16 bit of) DX in the `DX' register.
This function will only work for a subset of DOS functions which
require no arguments at all, or take non-pointer arguments in the `AL'
and `DX' registers only.  For functions which require a pointer in the
`DX' register, use `bdosptr' (bdosptr:.).   

Return Value
------------

Whatever the called function returns in the AX register.

Example
-------

     /* read a character */
     int ch = bdos(1, 0, 0) & 0xff;


See Also: bdosptr

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