www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/05/24/18:56:21

From: Charles Sandmann <sandmann AT praline DOT no DOT NeoSoft DOT com>
Subject: Re: Compiling gdb, dpmi DS:VRAM hack.
To: mat AT ardi DOT com, djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP Mailing List)
Date: Wed, 24 May 1995 15:11:35 -0500 (CDT)

Forwarded message:
To: junaid AT barney DOT eng DOT monash DOT edu DOT AU (Junaid A. Walker)
Date: Tue, 23 May 1995 19:49:16 -0500 (CDT)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP Mailing List)

> 	Finally here's a hack to make conventional memory accessible
> to DS under dpmi - Sure hope that the V2.0 cswdpmi emulator supports
> this hack.... use 'gcc f.c -lpc' to compile.

Yes, this should work just fine under cwsdpmi or V2 as it works under
Win 3.1 *BUT*:

 1) This code will work in certain circumstances but not others.  The
    algorithm is bugged in that it assumes the base of DS will not change.
    This may not be true if you call malloc() or any libc routine which
    calls malloc().  You must recompute the address if sbrk() gets called,
    and reset the limit.
 2) Not all DPMI providers allow you to set limits which span memory you
    do not own.  In this case this algorithm does not work at all.
 3) As noted, this bypassses all memory protection under Windows, so a
    bad pointer will crash Win instead of giving a GPF traceback.

- Raw text -


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