mov ax, 5802h ;Get Upper-Memory Link
int 21h
mov LinkFlag, al ;1 = linked, 0 = not linked
Get Upper-Memory Link (Function 5802h) specifies whether programs can allocate memory from the upper memory area.
This function has no parameters.
The carry flag is clear and the AL register contains 01h if the upper memory area is linked; otherwise, AL contains 00h.
For more information about upper memory blocks and memory allocation, see Chapter 5, “Program Management.”
Function 48h Allocate Memory
Function 5803H Set Upper-Memory Link