virtual 86 mode

virtual 86 mode

(processor, programming)(Or "virtual mode" or "virtual 8086mode") An operating mode provided by the Intel 80386 andlater processors to allow real mode programs to run underoperating systems which use protected mode. In thissub-mode of protected mode, an operating environment iscreated which mimics the address calculation in real mode.

In virtual 86 mode the segment MMU is practically turned offand the segment registers exhibit the same behaviour as inreal mode. The paged MMU, however, still operates. Thismeans that the one megabyte address space of real mode canbe remapped in four kilobyte pages to anywhere in the 32 bitphysical address space. Each page can be protectedseparately from read or write accesses.

Virtual mode is handled on a per-task-basis, so eachexception (from protection violations or interrupts)switches the processor back into protected mode. It istherefore possible to have multiple tasks in virtual modewhich run concurrently under the control of an operatingsystem which runs in protected mode.

Most operating system services in MS-DOS systems are calledby software interrupts, which are a kind of exception. Ifan MS-DOS application runs in virtual mode under the controlof a protected mode operating system, each call to MS-DOScauses a switch to protected mode. The operating systememulates the MS-DOS service and switches back to theapplication in virtual mode. From the viewpoint of theapplication nothing differs from real mode.

Microsoft Windows, Windows NT, and OS/2 use this featureto implement "DOS-boxes" in which both MS-DOS and real modeapplication programs can run.