(Also known as V86 mode)

A mode of the Intel 80i386 and higher processors that lets them emulate an 8086. Unlike real mode, this is under the supervision of a protected mode operating system.

V86 mode permits multiple 8086 programs to run simultaneously, and simultaneously with protected mode programs

The protected mode operating system can create page tables and other data structures for the virtual 8086, as is typically created in any modern multitasking operating system for any process, protected mode or not. Page faults can occur like any other process in protected mode, and they are handled by the installed page fault handler. But unlike protected mode, the code that runs in V86 mode is 8086, 16 bit code. (Note that the page fault handler is typically part of the protected mode operating system.)

V86 mode also allows the host operating system to emulate hardware, as often the operating system does not permit or want old MS-DOS programs directly interfacing with hardware.

Common use: The most common use of V86 mode is for operating systems or program execution environments to run MS-DOS programs, usually alongside full 32 bit native programs. (The so called Virtual Dos Machines) Notably, NT, Win95, OS/2 and Linux’s DosEmu.

Another, and not so well known use, is by EMM386.EXE which actually works in protected mode. To emulate expanded memory for ms-dos programs without expensive memory copying whenever a different section is desired, EMM386 creates a page table that maps a section of memory above 1MB into the expanded memory buffer, where this buffer is below one megabyte in the address space. In a sense, EMM386.EXE then runs MS-DOS underneath it in V86 mode.

A slightly more esoteric use is to run real mode initialisation code stored in the BIOS of adapter cards. For example, Xfree86 can initialise secondary display adapters by using V86 mode to execute the card’s boot-up code. (Code that would normally be executed when the main BIOS executes POST, if the card was the only one present in the system) This is useful, as often the on card BIOS is the only known reliable routine for initialising a display adapter.

It is used when execution of real mode code is desired in a (typically multitasking) protected mode environment. A program that implements 8086 machines using V86 mode is called a V86 monitor.

Compare: real mode, protected mode
See also: DPMI, VCPI

Partially used reference: http://my.tele2.ee/mtx/i386/chp15-00.htm

Log in or register to write something here or to contact authors.