INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
AH = 58h
AL = subfunction
02h get UMB link state
Return: AL = current link state
00h UMBs not part of DOS memory chain
01h UMBs in DOS memory chain
03h set UMB link state
BX = new link state
0000h remove UMBs from DOS memory chain
0001h add UMBs to DOS memory chain
Return: CF clear if successful
CF set on error
AX = error code (01h) (see #01680)
Notes: a program which changes the UMB link state should restore it before
terminating
UMBs will only be available if CONFIG.SYS contains the line DOS=UMB,
any UMBs were allocated by DOS's init and config processing, and
the UMBs have been linked into the memory chain with AX=5803h
users may wish to set the allocation strategy to prefer or enforce
allocating UMBs with AX=5801h as well
enabling the UMB link will patch the last Low Memory Area MCB to
hold an 'M' letter to indicate it is not the last MCB, likewise
disabling the UMB link will patch the last LMCB's letter to 'Z'.
(the last LMCB is the MCB before the first UMCB. the latter is
typically at segment 9FFFh for a 640 KiB Low Memory Area.)
DOS keeps track of the UMB link state in an internal variable too
if the extended allocation strategy mask 100h is set (see #01679
at AH=58h), lDOS can use UMBs even with the UMB link disabled.
BUGS: FreeDOS only allocates UMBs once during fdconfig.sys processing,
after the first device driver that provides at least one UMB on
the XMS interface (see INT 2F/AX=4310h). (FreeDOS kernel issue
#250.) reportedly, MS-DOS will allocate any additional UMBs
after subsequent drivers were loaded. this is also true of lDOS.
FreeDOS tries to allocate the first UMB without checking that it
is large enough with DOSDATA=UMB (FreeDOS kernel issue #203).
SeeAlso: #01687,#02766 at INT 2F/AX=4310h,AX=4B80h"FreeDOS"