Mail Archives: djgpp/1999/11/18/16:40:02
You can't really do it very easily. You can only access logical
addresses directly; to access a physical address you must perform a
run-time calculation to convert the physical address into a logical
address first.
Normally, VGA memory is "out of bonds" of the range of memory that can
normally be accessed. This means you have a couple of choices, one is
called the "nearptr hack" and the other involves setting up a
selector. Read the FAQ for more info.
Incidentally, the whole point of protected mode is to remove the
ability for programs to do stupid things like overwriting other
programs memory space, and in some environments to stop them directly
accessing devices (eg the VGA). The "method for using 32-bit memory
addresses without using pm" is called "real big mode" or "unreal mode"
(amongst other names) and is a royal pain, not to mention that it
isn't supported by DJGPP, and can't be used under Windows or most
memory managers.
Davin.
On Wed, 17 Nov 1999 10:04:42 +0100, "Ulf Wikström"
<ulf_julius AT hotmail DOT com> wrote:
>I'm using DJGPP with inline assembler, and I'm new on protected mode and
>AT&T syntax. There's one thing I don't understand:
>How do I specify an absolute memory adress using assembler??? I can't find
>the answer anywhere, so it's all up to you proffesionals now :). I would
>like to access vga-memory... (this whole idea of a protected mode seems a
>little bit crazy to me, is there a method for using 32-bit memory adresses
>without using pm?)
__________________________________________________________
*** davmac - sharkin'!! davmac AT iname DOT com ***
my programming page: http://yoyo.cc.monash.edu.au/~davmac/
- Raw text -