TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: SYLVAIN LAUZON
from: SERGIO LO CASCIO
date: 1998-02-14 18:15:00
subject: i need to allocate some memory

Sylvain Lauzon un giorno parlo' di i need to allocate some memory....
 SL> I used int 21h/48 to allocate some memory but failed. the file is
 SL> .com Any ideas why it doesn't?
Yes: at first you have to shrink the memory used by your program
mov ax,cs
mov es,ax       ; in ES the segment you want to shrink
mov ax,4a00h
mov bx,val
int 21h
Where val is the number of memory used by your program you want to reduce to,
divided by 16.
Usually val can be the lenght of the .com file divided by 16
And then you can allocate with int 21h/8.
Someone said me about a bug on some version of tasm which prevent
you to use this method, but i don't know....
There is another method to allocate a 64000 bytes long buffer without
using ints but I don't remember...(I can ask)
Saluti,
RaaS / RiTUAL
--- Blue Wave/DOS v2.30 [NR]
---------------
* Origin: Rage BBS: jumpin' into the Italian Demo Scene! (2:335/354)

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