INT 21h - [DOS 2.0+]

Function 48h

Allocate Memory


Allocates memory to the current program.

Input:
AH = 48h
BX = number of paragraphs to be requested
Output:
CF = 0 function is successful
AX = pointer to allocated block
CF = 1 function is unsuccessful
BX = size of largest available memory block in paragraphs
AX = error code
07h = memory control block destroyed
08h = insufficient memory
Comments:
This function always fails when it is executed within COM-format programs. This is because they initially occupy the largest available block of memory. Therefore you must free some memory before using this function.
Function 4Ah used once before this operation, will allow this Funtion to Pass.