Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm writing my own operating system and I made lots of attempts to switch to Protected Mode, always crashing the system.
Can someone tell me a good URL about switching to Protected Mode?
Another question:Can I use BIOS calls in 32-bit Real Mode (unreal mode)?

There's an article about how linux does it at linux.com and a three part series at linuxgazette.com about writing a 'toy' OS that also describes the procedure.
You could also use the source, Luke! - that's (partly) what it's there for.

Good luck with your project, I've been working on one of my own for a bit now. Here are the sites I've been using:
http://my.execpc.com/~geezer/osd/index.htm
http://www.midpec.com/djgpp/protmode/index0_1.html#Top
http://www.visopsys.org/osdev/
http://www.500mhz.net/ndx.html
http://osdev.neopages.net/index.php
http://www.nondot.org/sabre/os/articles
http://therx.sourceforge.net/osdev/index.php?page=1
Some notes:
The nondot site is really great... very helpful.Also, here were the stumbling blocks I hit when working on that particular part:
1. Make sure the GDT is loaded and good to go before switching to protected mode
2. Make sure you change your segment selector values to usuable ones as soon as possible after entering protected mode, so that you have a less likely chance of accidentally using one and faulting
3. If you haven't loaded an IDT, any faults will immediately triple fault, so the code must be perfect. Best to disable interrupts right off the bat until you get things worked out, lest something trigger and triple fault.Good luck!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |