Mail Archives: djgpp/2000/02/21/10:51:21
On Fri, 18 Feb 2000, Prashant TR wrote:
> On Fri, 18 Feb 2000, #TAN KOK LEONG# wrote:
>
> > We have 16 bit real mode, 16 bit and 32 bit protected mode program.
> > I wish to know is there have any 32 bit real mode program??
>
> No. There's no such thing as 32-bit real mode program. Only 16-bit
> programs can be both real and protected.
Well, 32bit real mode programs are possible on the 386 using the
LOADALL (386 opcode 0F07).
The LOADALL insn loads all the CPU registers including the "hidden"
software invisible-registers (segment descriptor caches) .
At the completion of a LOADALL insn the entire CPU state is defined
according to the LOADALL datatable. So by manipulating the descriptor
cache base registers it is possible to access the entire address space
_wihtout_ switching to protected mode. That means that you can acess
memory above 1 MB while in real mode!
Actually the loadall insn was used extensively by 286 system programmers
because unlike the 386 the only way that the 286 could be switched back
into real mode was by resetting the CPU ( a typical "mode switch" for a
286 would be switch to protected mode, access the memory, save the cpu
state to the CMOS,then reset the cpu to come back to real mode).
So to avoid this timeconsuming mode switch 286 programmers used the
286 loadall insn to access >1MB memory.
The 386 loadall insn is present on the 386's but INTEL removed it from the
486 because of security resons (you can see why!)
Grendel.
Hi, I'm a signature virus. plz set me as your signature and help me spread
:)
- Raw text -