Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Int 21h Function 58h
 Detail                                    Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Interrupt:   21h     Function:   58h
 
  Title:       Get or Set Allocation Strategy [Version 3.0+]
 
  See also:    Allocate Memory Block
 
  Description:
 
     Obtains or changes the code indicating the current MS-DOS strategy
     for allocating memory blocks.
 
     Input                           Output
 
     If getting strategy code        If function successful
       AH = 58h                        Carry flag: clear
       AL = 00h                      And if called with AL = 00h
                                       AX = Allocation chosen
     If setting strategy code               00h = First fit
       AH = 58h                             01h = Best fit
       AL = 01h                             02h = Last fit
       BX = Desired strategy code    If function unsuccessful
            00h = First fit            Carry flag: set
            01h = Best fit             AX = Error code (01h)
            02h = Last fit             See: Error codes
                                    -♦-