Go to the first, previous, next, last section, table of contents.


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 (see section bdosptr).

Return Value

Whatever the called function returns in the AX register.

Portability

not ANSI, not POSIX

Example

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


Go to the first, previous, next, last section, table of contents.