delorie.com/djgpp/doc/libc/libc_62.html   search  
libc.a reference

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

bdosptr

Syntax

 
#include <dos.h>

int bdosptr(int func, void *ptr, unsigned al);

Description

Calls function func of the software interrupt 0x21, passing it al as the subfunction and a pointer to a copy of the buffer contents whose address is in ptr through the DX register. This function will only work for a subset of DOS which require an argument in the AL register and a pointer in DX register. For functions which require non-pointer arguments in the DX register, use bdos (see section bdos). To make the contents of ptr available to DOS, bdosptr copies it to the transfer buffer located in the low (below 1 Meg mark) memory.

Currently, some of the functions which take a pointer to a buffer in DX are NOT supported (notably, most of the FCB-based functions). See section int86, for the list of supported functions.

Return Value

Whatever the called function returns in the AX register.

Portability

ANSI/ISO C No
POSIX No

Example

 
/* print a string */
bdosptr(9, "Hello, there$", 0);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004