This is an old revision of the document!
Table of Contents
Note: This API call is for DOS and Win16 personality only. Use Family API for portability.
Int 21H, AH=49H
Version
2 and higher
Brief
FREE MEMORY
Family API
Input
AH = 49h ES = segment of block to free
Return
CF clear if successful
CF set on error
AX = error code (07h,09h) (see #01680 at AH=59h/BX=0000h)
Notes
apparently never returns an error 07h, despite official docs; DOS 2.1+
code contains only an error 09h exit
DOS 2.1-6.0 does not coalesce adjacent free blocks when a block is
freed, only when a block is allocated or resized
the code for this function is identical in DOS 2.1-6.0 except for
calls to start/end a critical section in DOS 3.0+
See also
AH=48h,AH=4Ah
Note
Text based on Ralf Brown Interrupt List Release 61
| osFree Macro Library | |
|---|---|
| Video I/O | @SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls |
| Hardware info | @Equipment @MemSize |
| Serial I/O | @AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus |
| Tape I/O | @TapeOn @TapeOff @TapeRead @TapeWrite |
| Keyboard I/O | @KbdStatus @CharIn @CharPeek |
| Printer I/O | @PrnPrint @PrnInit @PrnStatus |
| Disk I/O | @DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat |
| Date and Time | @SetTime @GetTime |
| Mouse | @MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion |
| Memory manager | @ModBlok SET_BLOCK |





