switching into Real 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:switching into Real Mode

Post by Pype.Clicker »

Yes. PIC must be restored to the old 8-f 7x-7x+7 values if 'real' realmode is wanted, though it's unnecessary if you don't plan to receive any IRQs (e.g. if you're just trying to call VESA or APM bios ...)

i **strongly** suggest the reading of TRAN's start32.asm tutorial/dos-extender for anyone who wishes to get back to real mode.
Compared to coming back to real mode, going to pmode is damn easy ...
ASHLEY4

Re:switching into Real Mode

Post by ASHLEY4 »

Thanks Clicker,I will give TRAN's start32.asm tutorial/dos-extender a read ;).
PS: I for one would only use this method, For vesa mode swiching.
ASHLEY4.
ASHLEY4

Re:switching into Real Mode

Post by ASHLEY4 »

I have had a look at the tran's tut/code, I found it give a very good insite in to switching from pmode to realmode using v86, But according to what i have read on the v2os pages v86 (which is what tran's is going on about )is slower then simple switching from pmode to realmode.

So i am go to make a demo of the two and see which is best .

PS: I have already remapped pic's, But to use the v2 method i think that you would need to just test for error int or not and jump to the right handler.

ASHLEY4.
Tim

Re:switching into Real Mode

Post by Tim »

Two points:

1. You don't know which is faster until you have written both and timed them. Don't just go by hearsay.

2. If switching to and from real mode is faster than V86 mode, why would V86 mode exist? V86 mode was introduced with the 386 to made multitasking DOS boxes possible. V86 mode isn't really a separate mode, but an EFLAG which toggles real-mode-style address formation in protected mode. If performance is your only consideration, you should prefer V86 mode.

Observant readers will notice that these two points contradict each other.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:switching into Real Mode

Post by Pype.Clicker »

The efficiency of V86 mode may vary quite alot depending on the amount of monitor calls are performed (and thus how much instructions are 'emulated' by the monitor rather than executed by the CPU).

Virtual Mode Extension, IOPL and IO bitmap may help providing a decent speed V86 ...

If all you want to do in V86 mode is shut the computer down or switch video mode, speed is irrelevant anyway :)
Post Reply