TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: SAM IZZO
from: DARRYL GREGORASH
date: 1997-12-22 03:09:00
subject: Memory Allocation

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.