When a *.COM program loads, it is given all the available memory. Before a
*.COM program can allocate memory, it must first dealllocate all of the
memory it owns. One good way to do this is function 4Ah Int 21h. The memory
should be resized to use only the memory in use by the program. This is how
I had done it:
mov bx,PRG_SIZE * 1024 / 16 ;Reduce memory needs to 19K
mov ah,4Ah ;where ES=program segment.
int 21h
PRG_SIZE is assigned the number of xxxK bytes required by the *.COM
program - in this case 19 for a 19K program.
--- Maximus 3.01
---------------
* Origin: Castrovalva BBS 610-917-0380 (1:2626/102)
|