en:docs:dos:api:int21:48

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:dos:api:int21:48 [2021/05/01 15:55] – created prokusheven:docs:dos:api:int21:48 [2021/08/14 08:46] (current) prokushev
Line 13: Line 13:
 ===== Family API ===== ===== Family API =====
  
 +[[en:docs:fapi:dosallochuge|DosAllocHuge]], [[en:docs:fapi:dosallocseg|DosAllocSeg]]
  
 ===== Input ===== ===== Input =====
  
- AH = 48h +  AH = 48h 
- BX = number of paragraphs to allocate+  BX = number of paragraphs to allocate
  
 ===== Return ===== ===== Return =====
  
- CF clear if successful +  CF clear if successful 
-     AX = segment of allocated block +    AX = segment of allocated block 
- CF set on error +  CF set on error 
-     AX = error code (07h,08h) (see #01680 at AH=59h/BX=0000h) +    AX = error code (07h,08h) (see #01680 at AH=59h/BX=0000h) 
-     BX = size of largest available block+    BX = size of largest available block 
 + 
 +===== Macro ===== 
 + 
 +<code asm> 
 +INCLUDE DOS.INC 
 + 
 +ALLOCATE_MEMORY bytes 
 +</code> 
  
 ===== Notes ===== ===== Notes =====
  
-  DOS 2.1-6.0 coalesces free blocks while scanning for a block to +DOS 2.1-6.0 coalesces free blocks while scanning for a block to allocate 
-   allocate + 
- .COM programs are initially allocated the largest available memory +.COM programs are initially allocated the largest available memory block, and should free some memory with AH=49h before attempting any allocations 
-   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
- under the FlashTek X-32 DOS extender, EBX contains a protected-mode +
-   near pointer to the allocated block on a successful return+
                      
 ===== See also ===== ===== See also =====
  
- AH=49h,AH=4Ah,AH=58h,AH=83h+ **[[en:docs:dos:api:int21|INT 21H]]:** [[en:docs:dos:api:int21:49|49H]][[en:docs:dos:api:int21:4a|4AH]][[en:docs:dos:api:int21:58|58H]]
  
 ===== Note ===== ===== Note =====