Page 1 of 1

[Code Request] Switching to and from realmode

Posted: Thu Oct 02, 2008 4:05 am
by codemastersnake
Hi all!

Well I have searched many of tutorials and codes, But wasn't able to find anything good.

I need to switch to real mode and back to pmode w/o loosing any data from anywhere. and in the minimum time... what should I use... vmode?

psuedo code:

1) request for swicth vesa mode
2) switch to rmode and fire int 10h with required function
3) switch back to pmode and continue working

Well I need source code, I know many of you will say that you should do it yourself... well I just need an idea to get started...

Re: [Code Request] Switching to and from realmode

Posted: Thu Oct 02, 2008 4:46 am
by ru2aqare
Snake wrote:Hi all!

2) switch to rmode and fire int 10h with required function
3) switch back to pmode and continue working

Well I need source code, I know many of you will say that you should do it yourself... well I just need an idea to get started...
If you want, you can take a peek at my boot loader. It can switch back to real mode (or v86 mode) from 32-bit and 64-bit protected mode, plus it redirects IRQs occurring in real mode back to protected mode, so you don't lose interrupts.

Re: [Code Request] Switching to and from realmode

Posted: Thu Oct 02, 2008 11:30 am
by Dex
You can take a look at my vesa demo that goes to and from pmode to real mode for mode switching
http://dex4u.com/demos/VesaDemo.zip