Releases a memory block and makes it available for use by other programs.
Call with:
AH = 49H
ES = segment of block to be released
Returns:
If function successful
Carry flag = clear
If function unsuccessful
Carry flag = set
AX = error code
Notes:
This function assumes that the memory block being released was previously obtained by a successful call to Int 21H Function 48H.
The function will fail or can cause unpredictable system errors if:
the program releases a memory block that does not belong to it.
the segment address passed in register ES is not a valid base address for an existing memory block.
Example:
Release the memory block that was previously allocated in the example for Int 21H Function 48H (page 438).
bufseg dw ? ; segment base of block
.
.
.
mov ah,49h ; function number
mov es,bufseg ; base segment of block
int 21h ; transfer to MS-DOS
jc error ; jump if release failed
.
.
.