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=48H
Version
2 and higher
Brief
ALLOCATE MEMORYY
Family API
Input
AH = 48h BX = number of paragraphs to allocate
Return
CF clear if successful AX = segment of allocated block CF set on error AX = error code (07h,08h) (see #01680 at AH=59h/BX=0000h) BX = size of largest available block
Notes
DOS 2.1-6.0 coalesces free blocks while scanning for a block to allocate
.COM programs are initially allocated the largest available memory block, and should free some memory with AH=49h before attempting any allocations
under the FlashTek X-32 DOS extender, EBX contains a protected-mode near pointer to the allocated block on a successful return
See also
AH=49h,AH=4Ah,AH=58h,AH=83h
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 |