Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - int 21 - dos 3+ - get/set memory allocation strategy http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 21 - DOS 3+ - GET/SET MEMORY ALLOCATION STRATEGY
        AH = 58h
        AL = function code
            00h get allocation strategy
            01h set allocation strategy
               BL = strategy code
                   00h first fit (use first memory block large enough)
                   01h best fit (use smallest memory block large enough)
                   02h last fit (use high part of last usable memory block)
                   bit 7 set (DOS 5beta) to allow use of upper memory blocks
            02h (DOS 5beta) get UMB link state
                Return: AL = 00h UMBs not part of DOS memory chain
                           = 01h UMBs in DOS memory chain
            03h (DOS 5beta) set UMB link state
                BX = 0000h remove UMBs from DOS memory chain
                   = 0001h add UMBs to DOS memory chain
Return: CF set on error
            AX = error code (01h) (see AH=59h)
        CF clear if successful
            AX = strategy code if AL was 00h
               = UMB link state if AL was 02h
Note:   the Set subfunction accepts any value in BL; 2 or greater means last
          fit under DOS 2 through DOS 4.x
        the Get subfunction returns the last value set, so programs should
          check whether the value is >= 2, not just equal to 2.
        a program which changes the allocation strategy should restore it
          before terminating
SeeAlso: AH=48h,AH=49h,AH=4Ah

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson