TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: SAM IZZO
from: BRIAN MCCLOUD
date: 1998-01-07 14:25:00
subject: Registers on entry

SI>Can anyone tell me if it's safe to assume that all registers are zero on
SI>entry to a .COM program?
No, especially not the segment registers.
SI>Also, why can't I allocate memory in my .EXEs?  Do I have to do that
SI>deallocate thing that I've done in .COMs?  For example, with the following
SI>code:
SI>        mov ah, 48h
SI>        mov bx, 64d
SI>        int 21h
SI>When I run it thru Turbo Debugger, AX = 8, which is "insufficient memory".
SI>Doesn't it say in the .EXE header how much memory my code needs?
It should, but the EXE header only includes predeclared memory needs, not
dynamic memory needs via int 21h function 48h.  Also, check the value of BX
after the interrupt call.  That should indicate the size of the largest block
available.
((Cloud))
MauveCloud@juno.com
 * OLX 2.2 * Press "+" to see another tagline.
--- PCBoard (R) v15.3/M 10
---------------
* Origin: Next time, Dial The Wrong Number! (209) 943-1880 (1:208/205)

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™.