Re: Is it possible to address more than 1MB in real-mode



Elcaro Nosille wrote:
Would it be possible to use a 32-bit addressing-mode in real-mode via
address-size prefix and thereby to have segments which are 4GB long?

Yes, it's possible. However, first you have to change the size of the
segments in the Internal Descriptor Cache. Otherwise, you'll get a GPF (i'm
not sure, however, if the processor even tries to handle such a strange
thing as a GPF triggered in real mode of if it tripple faults immediately)...

This (changing the size of the segments) is a feature of PM, so you need PM
to do this. So, you go to 16-bit PM, you load your segment registers with
4GB segment descriptors, and then you switch back to real mode, since you
still want to run the BIOS and things alike... Then, you can access data
above 1MB and (I suppose), run code there. Beware that the BIOS won't be
able to return to extended memory, though...

What I described is what we usually call Unreal Mode, Voodoo Mode, Flat
Real Mode, 32-bit Real Mode (this is the less accurate of them!), etc.
In the unlikely case that you have a 386 or a 286, you can also use LOADALL
(but it's not recommended unless you don't intend to share your code with
anyone else).

JJ

.



Relevant Pages

  • Re: Is it possible to address more than 1MB in real-mode
    ... address-size prefix and thereby to have segments which are 4GB long? ... segments in the Internal Descriptor Cache. ... Otherwise, you'll get a GPF ... 4GB segment descriptors, and then you switch back to real mode, since you ...
    (comp.lang.asm.x86)
  • Re: Prefix 0x0F is used in 16 Bit
    ... > No, I think you can go to protected mode, set up the segments to be ... > running in real mode combined with the simplicity of 32 bit flat pointers. ...
    (comp.lang.asm.x86)
  • Re: What exactly is Protected Mode?
    ... Then they switch back to real mode. ... >>not a true flat mode, for all practical purposes it acts like one. ... The fs and gs segments are used and therefore cannot be manipulated, ... Flat real mode makes the segments irrelevent. ...
    (alt.lang.asm)
  • Re: Prefix 0x0F is used in 16 Bit
    ... >>No, I think you can go to protected mode, set up the segments to be ... >>running in real mode combined with the simplicity of 32 bit flat pointers. ... But, that is a hack, and only ... > get out of protected mode, ...
    (comp.lang.asm.x86)
  • BIOS in Protected Mode
    ... A current thread reminded me of our earlier thread about using the BIOS ... in protected mode. ... Part of the trick was to stick to 64K segments, ...
    (comp.lang.asm.x86)