www.delorie.com/djgpp/doc/libc-2.02/libc_56.html   search  
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.

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 1998   by DJ Delorie     Updated Dec 1998  

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)