Function 48h (72) Allocate Memory
Allocates a specified number of memory paragraphs.
On entry: AH 48h
BX Number of memory paragraphs to be allocated
Returns: AX Segment address of allocated memory
Error code, if CF is set
BX Size of largest available block (CF set)
Error codes: 7 Memory control blocks destroyed
8 Insufficient memory
Call Function 59h for extended error code information
(DOS 3.0 and above).
--------------------------------------------------------------------------
Function 48h dynamically allocates memory, in multiples of 16 bytes
(one paragraph). The amount of memory to be allocated, in paragraphs,
is specified in BX. If the function is successful, AX:0000 points to
the allocated memory block. (AX holds the segment address; the offset
is always 0000).
Notes: By setting BX=FFFFh before calling, this function
can be used to find the amount of available memory,
which will be returned in BX. (The call will return
an error, which can be ignored, since DOS cannot
allocate more than 640k of memory.)
Seealso:
This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster