delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/06/07/04:06:50

Date: Wed, 7 Jun 1995 09:40:07 +0300
From: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Editing the GDT
Cc: meyer AT shrike DOT und DOT ac DOT za

>I want to be able to access an arbitrary chunk of memory.. [grin, to those of
>you who know why] placed at 13meg, linear, 1 meg long.

>None of the selectors defined by default seem to point to the GDT [Am I way
>off track?]

There is a DPMI call which will let you map any physical address area into
your program's address space.  This is from the DJGPP FAQ list:
 
18.9  Q: How can I access memory-mapped peripheral devices (or any other
         absolute address) above 1 MByte mark?
      A: Currently, you can do this in one of two ways:
 
           * Under a true DPMI host (such as Windows or QDPMI) use DPMI
             function 0x0800 (i.e., Int 31h/AX=0800h).  It returns a
             linear address which can be used to access a given absolute
             physical address.  You can then use the functions from
             <sys/farptr.h> to access that linear address.  This will be
             the *only* way to access physical memory locations in DJGPP
             v2.0.
 
           * In non-DPMI mode, add 0xe0000000 to the physical address and
             use that as a pointer.  This feature will disappear in v2.0.
 
The latest version of the FAQ list is available as faq101.zip from the same
place you got DJGPP.

- Raw text -


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