GreekS85
January 21st, 2005, 06:10 AM
Hi guys! i'm trying to allocate a modest amount of memory, merely 512 bytes, so i call the DOS interrupt 21h to allocate memory:
Input:
AH=48h (The code for memory allocation function)
BX=20h (paragraphs of 16 bytes, 20hx16=512d)
after return from the interrupt, i get:
Output
AX=0008 (error code, 8 stands for Insufficient memory)
BX=0007 (available paragraphs, only, what?! 70h bytes?)
My System runs on Mindows XP. The program is assembled using debug run through cmd.exe. I definately have more memory then that; 256mb.
My config files for the 16bit subsystem are:
AUTOEXEC.NT
@echo off
lh %SYSTEMROOT%\system32\mscdexnt.exe
lh %SYSTEMROOT%\system32\redir
lh %SYSTEMROOT%\system32\dosx
SET BLASTER=A220 I5 D1 P330 T3
CONFIG.NT
dos=high, umb
device=%SystemRoot%\system32\himem.sys
files=40
I wouldn't like to use anything else for that small an amount! XMS is way too complicated. I also need something not depending on HIMEM.sys or 386 processors. Do you suggest any othe memory management system?
Input:
AH=48h (The code for memory allocation function)
BX=20h (paragraphs of 16 bytes, 20hx16=512d)
after return from the interrupt, i get:
Output
AX=0008 (error code, 8 stands for Insufficient memory)
BX=0007 (available paragraphs, only, what?! 70h bytes?)
My System runs on Mindows XP. The program is assembled using debug run through cmd.exe. I definately have more memory then that; 256mb.
My config files for the 16bit subsystem are:
AUTOEXEC.NT
@echo off
lh %SYSTEMROOT%\system32\mscdexnt.exe
lh %SYSTEMROOT%\system32\redir
lh %SYSTEMROOT%\system32\dosx
SET BLASTER=A220 I5 D1 P330 T3
CONFIG.NT
dos=high, umb
device=%SystemRoot%\system32\himem.sys
files=40
I wouldn't like to use anything else for that small an amount! XMS is way too complicated. I also need something not depending on HIMEM.sys or 386 processors. Do you suggest any othe memory management system?