2007-06-22 23:01:22

by Bodo Eggert

[permalink] [raw]
Subject: Re: how to tell linux (on x86) to ignore 1M or memory

Rene Herman <[email protected]> wrote:

> The point was that real mode could only access the first 1M, not
> the first 16... :-)

The real mode on i386+ can actually access the whole 4GB address range due to
a former-bug-now-feature in the i386+. This "bug" causes the segment limit
to not be reset on return to real mode, but only on subsequent assigns to
the segment registers/selectors. Using a rarely used segment register like
GS, you could use extended memory in your program.

Obviously this needs 1) Entering and returning from protected mode, 2) all
programs to agree not to clobber GS and 3) not using v86 mode (EMM386.exe).
Therefore and because it was discovered in the late days of DOS it was not
in widespread use. Some DOS extenders were reported to use it ...

http://www.programmersheaven.com/mb/x86_asm/344953/344953/readmessage.aspx
--
The programmer's National Anthem is 'AAAAAAAAHHHHHHHH'

Fri?, Spammer: [email protected]
[email protected] [email protected]


2007-06-22 23:08:56

by Rene Herman

[permalink] [raw]
Subject: Re: how to tell linux (on x86) to ignore 1M or memory

On 06/23/2007 01:00 AM, Bodo Eggert wrote:

> The real mode on i386+ can actually access the whole 4GB address range
> due to a former-bug-now-feature in the i386+.

Generally called "unreal mode". Yes, sure. Just a hack though.

Rene.