Page 1 of 1
Help in 32bit mode
Posted: Tue Feb 17, 2004 2:17 am
by BuriedCoder
The intel documentation says to switch to Prot. Mode we've goto to modify the CR0 bit, which is inacessible by 16 bit code. Then how to switch to p. Mode at all?
Re:Help in 32bit mode
Posted: Tue Feb 17, 2004 2:26 am
by Pype.Clicker
probably you should re-read the docs calmly ...
you *do* have access to CR0 register (as well as the full 32 bits eax,ebx,ecx etc.) in real mode on a 386+ ... However, there's no such register on earlier 16 bits machines.
Real mode on a 386 is *more* than backward-compatibility with 8086.
I suggest you get a look at the pmode tutorials on OSRC (see .:QuickLinkz:.)
Re:Help in 32bit mode
Posted: Tue Feb 17, 2004 5:14 am
by Solar
...or use a ready-made bootloader that does the switch to protected mode for you, like GRUB.
(Standard advice when people ask for the basics of RMode vs. PMode...)
Re:Help in 32bit mode
Posted: Tue Feb 17, 2004 5:18 am
by BI lazy
... thus spake Tim.bot.II *lol*
Honestly, the both of you two are cool timbots
Re:Help in 32bit mode
Posted: Tue Feb 17, 2004 6:11 am
by Candy
as for the more useful answer:
you can use all 32-bit registers in real mode too.
BUT, since the 286 also knew protected mode, but no 32-bit, it had a different method, which is STILL VALID. Using SMSW and LMSW for the low 16 bits of CR0 still works, and that's still where the P bit is.
HTH & C&CW
Re:Help in 32bit mode
Posted: Tue Feb 17, 2004 2:13 pm
by Tim
BI lazy wrote:
Honestly, the both of you two are cool timbots
ERROR! SHARING VIOLATION!