cvs.delorie.com/djgpp/doc/libc/libc_201.html   search  
libc.a reference

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

__dpmi_allocate_dos_memory

Syntax

 
#include <dpmi.h>

int __dpmi_allocate_dos_memory(int _paragraphs,
                               int *_ret_selector_or_max);

Description

Please refer to the DPMI Specification (see section DPMI Specification) for details on DPMI function call operation. Also see the DPMI Overview (see section DPMI Overview) for general information.

DPMI function AX = 0x0100

This function allocates DOS memory. You pass it the number of paragraphs ((bytes+15)>>4) to allocate. If it succeeds, it returns a segment (dos-style) and fills in _ret_selector_or_max with a selector (protected-mode) that you can use to reference the same memory. Note that it's the selector you use to free the block, not the segment.

Return Value

-1 on error, else the segment [0000..FFFF].

Portability

ANSI/ISO C No
POSIX No


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004