Switching to Protected Mode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Philip
Member
Member
Posts: 59
Joined: Thu Mar 06, 2008 11:37 pm
Location: Singapore

Switching to Protected Mode

Post 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? :)
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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]
User avatar
Philip
Member
Member
Posts: 59
Joined: Thu Mar 06, 2008 11:37 pm
Location: Singapore

Post by Philip »

thanks, quite useful :)
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

It's working now - not sure what it was but was seemingly temporary :-)
StephanvanSchaik
Member
Member
Posts: 127
Joined: Sat Sep 29, 2007 5:43 pm
Location: Amsterdam, The Netherlands

Post 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.
User avatar
Philip
Member
Member
Posts: 59
Joined: Thu Mar 06, 2008 11:37 pm
Location: Singapore

Post 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 :)
Attachments
PMODE.ASM
(3.71 KiB) Downloaded 21 times
Post Reply