www.delorie.com/djgpp/doc/libc-2.02/libc_57.html   search  
Go to the first, previous, next, last section, table of contents.


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

not ANSI, not POSIX

Example

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


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)