delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/15/14:26:42

Message-Id: <2.2.32.19960515182333.008c3868@gateway.mpath.com>
Mime-Version: 1.0
Date: Wed, 15 May 1996 11:23:33 -0700
To: djgpp AT delorie DOT com
From: Piaw Na <piaw AT mpath DOT com>
Subject: Help with DJGPP runtime

I'm writing a sockets-on-DOS library that's intended to export Win95 winsock
functionality to DOS programs, and am running into difficulties with
supporting DJGPP.

Basically, what I'm doing is to have a Win32 program load up a VxD which
then locks down some shared memory for sharing between DOS protected mode
applications and Win32 applications.  The VxD then services requests to the
shared memory via a software interrupt.  (Int 0x48)

Watcom DOS4GW programs seem to be mapped to the same linear addressing mode
as windows programs, hence, the shared memory is accessible to DOS4GW
programs generated by Watcom.  In other words, when you poke at the LDT for
the selectors used by Watcom programs, they show a base of 00000000 and an
upper limit of ffffffff, indicating access to the full 4GB of address space
under Windows 95.  For the purposes  of sharing between Win95 and DOS
programs, we use addresses in the 82xxxxxx range.

For some reason DJGPP's programs run in their own space, and have no access
to that.  In fact, when you poke at the LDT for DJGPP programs, you see that
the DJGPP program seems to have access only to about 400KB of memory, with a
limit of 0x5ffff set.  I need a way to get DJGPP programs to share the full
range of memory under Win95, either by having the compiler generate code
that's compatible with DOS4GW, or by hacking the runtime (I assume this is
either GO32 or some other extender).  Any help in this will be much
appreciated.  (If you could send mail to me directly and let me summarize,
that would be best)

Thanks,
Piaw
piaw AT mpath DOT com
http://www.mpath.com/~piaw

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019