DOS memory Question..... or How to increase base memory for DOS apps

Dustin Navea speeddymon at
Fri May 31 09:55:50 CDT 2002

--- Christian Costa <titan.costa at> wrote:
> Hi,

> Many DOS apps needs a lot of base memory even if EMS
> or XMS memory are used.
> The first 64K of memory being lock to catch null
> pointer, the DOS memory 
> must start
> at 0x10000 as you can see in the code below
> (msdos/dosmem.c) :


> Changing this value to the end of the BIOS DATA area
> (0x500) does the 
> job and things work
> as expected (at least for DOS apps).
> But I was told that this causes problems for others
> apps.
> Probably for Win16 ones that use DOS3CALL and not
> int21h via DPMI.

I don't know it if is possible, but if that is true,
why not just emulate int21h calls when DOS3CALL is
called when we are running a win16 app, and the rest
of the time, leave everything be?  Or better yet, why
not change the value to the end of the bios data area
only when we are running pure dos apps?

> If it's true, a solution could be to initialize DOS
> memory differently 
> for pure DOS apps
> by modifying the DOSMEM_Init function.
> DOSMEM_Init is called at 3 different places :
> - process_attach in dlls/kernel/kernel_main.c
> - DOSVM_Init in dlls/winedos/dosvm.c
> - MZ_InitMemory in dlls/winedos.dosvm.c
> and acts differently the first and second calls.
> Since I don't know wine internals enough and the
> "flow of execution", I 
> have no idea how
> to do it in a clean way that do not break
> everything.
> If someone can help me or give me hints?

Or you could do that, but there is no sure-fire way to
do everything cleanly and even then, it may not fix
every dos app, or even worse it could break some
non-dos app in unforeseen ways...  What is DOSEmu
licensed under and is it actually open source?  I'm
wondering, maybe if it is under a compatible license
and open source, couldn't we take the DOS3CALL or
int21h routines (or at least parts of them) from


Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

More information about the wine-devel mailing list