Switching to Virtual 8086 Mode
Posted: Sun Apr 27, 2014 2:45 pm
So far I have been displaying text using the default VGA text-mode. How would I switch to Virtual 8086 mode so I can make the video change and return back to Protected mode?
The Place to Start for Operating System Developers
https://forum.osdev.org/
If you ever wish to support x64 (or get bored with v86) just grab a copy of Real-Mode Emulator or x86emu, for mode-switching I just wrote a simple program that captures arguments and switches to relevant video mode and is linked against Real Mode Emulator. Whenever I want to switch I just execute that program with arguments. IIRC both RME and x86emu don't require any sort of library unless you wan't to debug in which both will require a fairly standard printf.
Well in this situation, he could in "theory" do what a lot of people suggest, which is fairly reasonable. Just while your in 32bit protected mode, set the highest video mode you want, since you probably won't ever change it anyways. I mean I don't, and even if you did.. Just program your Os to reboot and then set the new mode on next boot. Just an idea, although emulating can work. I wouldn't write your own emulator though, I attempted it, learned a lot but it was a very complex process and in the end I decided to just use V8086.Bender wrote:Has been discussed n number of times (where n > 50). Also, virtual 8086 isn't supported in Long Mode, and I doubt if Intel bothers to improve it. V8086 is used mainly for running 16-bit programs, It is preferable to use an existing 80(3)86 emulator. It's easier than using v86 as emulators don't require user mode and can run in any sort of environment. Just re quoting myself:If you ever wish to support x64 (or get bored with v86) just grab a copy of Real-Mode Emulator or x86emu, for mode-switching I just wrote a simple program that captures arguments and switches to relevant video mode and is linked against Real Mode Emulator. Whenever I want to switch I just execute that program with arguments. IIRC both RME and x86emu don't require any sort of library unless you wan't to debug in which both will require a fairly standard printf.