ftp.delorie.com/djgpp/doc/libc/libc_61.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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

ANSI/ISO C No
POSIX No

Example

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


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004