Table des matières

INT 0x21 - 0x4a - Resize Memory Block (DOS 2+)

This function :

Request/Call:

reg value descr
AH 0x4a
BX New memory size in paragraph
ES segment (block) to resize

Return:

** CF is cleared if successful**

CF is Set if error

reg descr
AX Error Code (0x07, 0x08, 0x09) (See Int 0x21, 0x59, Dos Error Code)
BX maximum paragraphs available for specified memory block

Notes & Comments

  • PC-DOS 2.1 and DOS 3.x will allocate the largest available block if CF is set. BX will equal the size allocated.
  • under DOS 2.1-5.0, if there is insufficient memory to expand the block as much as requested, the block will be made as large as possible
  • DOS 2.1-5.0 coalesces any free blocks immediately following the block to be resized

Back