It seems as if Real mode is no more obsolete to me. Last day, I wanted to include remote session in my kernel for which I needed to switch to Real mode(and not VM86 mode). For that, I needed to restore the Interrupt Vector Table as well as load real mode segments as it was in protected mode. This almost cracked my head.
I read many tutorials about switching to real mode from protected mode but none of them seems to work for me(or at most I am not getting them). Any try ends up losing the interrupt vector table (which is a must for the remote session). So I ended up with a conclusion.
Switching to real mode from protected mode is tougher than switching to protected mode from real mode. What do you guys think?
Any suggestion to switch back and forth??
Protected Mode Vs Real Mode
Protected Mode Vs Real Mode
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Re: Protected Mode Vs Real Mode
I use a real-mode emulator (x86emu) from protected mode.
Works a charm!
Works a charm!
Re: Protected Mode Vs Real Mode
Well, a real mode emulator is the suggested way to go, however, I had no issues going from pmode to real mode... just remember you don't have paging anymore, and real mode is limited to < 1mb... so make sure you put your real mode code under 1mb. Make sure to disable interrupts and verify you're running correctly before re-enabling interrupts. When my OS boots, it sets the first block as used, so saving the IVT is very simple in my case, and I never have to worry about someone else using it.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Protected Mode Vs Real Mode
Do you have an actual question or do you just like wasting our time? This is a "HEPL! I HAZ A PROBLEM HOW FIX.???? ??" type of question. Maybe you should explain what you're having problem with or post some code that we can help you debug...
What do we think? You didn't read the manuals.
What are the suggestions? Read the manuals.
What do we think? You didn't read the manuals.
What are the suggestions? Read the manuals.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]