#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
(see section bdosptr).
Return Value
Whatever the called function returns in the AX register.
Portability
ANSI/ISO C
No
POSIX
No
Example
/* read a character */
int ch = bdos(1, 0, 0) & 0xff;
Please take a moment to fill out
this visitor survey You can help support this site by
visiting the advertisers that sponsor it! (only once each, though)