Replying to a message of Sam Izzo to All:
SI> 100% assembler, so I thought I'd use Int 21h function
SI> 48h/49h to get/free some memory. I used these functions in
SI> a Turbo Pascal program to allocate some memory, and they
SI> worked fine, after I change TP's heap requirements
This has nothing to do with .COM or .EXE format; the clue to your answer is
in the last observation of yours that I quoted.
When DOS loads a program, it is given all available memory. Before you can
use the memory allocation function, you must have some free memory to
allocate.
Changing the heap requirements in TPascal did that for you, at load time,
before execution was passed to your code. In assembler, you must control that
all by yourself, or use linker directives to do it for you.
--- FleetStreet 1.21 NR
---------------
* Origin: BIG BANG Burger Bar: Regina SK Canada (1:140/86)
|