Page 1 of 1

Switching to Protected Mode

Posted: Fri Mar 07, 2008 9:31 am
by Philip
i found from the internet the sequence for
switching from real mode to protected mode is like this:

1) setup GDT
2) set PE bit in CR0
3) jmp far

but i still don't know how to code
could anybody show me a sample code please? :)

Posted: Fri Mar 07, 2008 9:38 am
by AJ
http://www.jamesmolloy.co.uk/
http://www.osdever.net/tutorials.php?cat=4&sort=1

..and of course, our own wiki.

Cheers,
Adam

[Edit]JamesM's page seems to be down at the moment - I guess just a temporary glitch...[/Edit]

Posted: Fri Mar 07, 2008 9:49 am
by Philip
thanks, quite useful :)

Posted: Fri Mar 07, 2008 10:05 am
by JamesM
It's working now - not sure what it was but was seemingly temporary :-)

Posted: Fri Mar 07, 2008 11:04 am
by StephanvanSchaik
Philip, why not bother searching around on the osdev.org wiki? There stands everything you need for this.

www.brokenthorn.com goes even more into the thing you want to do.


Regards, Stephan J.R. van Schaik.

Posted: Fri Mar 07, 2008 9:31 pm
by Philip
i found out this file,
it is simply switch to protected mode and switch back to real mode
should be useful for who is getting familiar with protected mode
like me :)