[Code Request] Switching to and from realmode

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
codemastersnake
Member
Member
Posts: 148
Joined: Sun Nov 07, 2004 12:00 am
Contact:

[Code Request] Switching to and from realmode

Post 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...
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: [Code Request] Switching to and from realmode

Post 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.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: [Code Request] Switching to and from realmode

Post 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
Post Reply