delorie.com/djgpp/faq/lowlevel/above-1m.html
|
search
|
How can I access memory-mapped peripheral devices (or any other
absolute address) above 1 MByte mark?
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.