Search code examples
assemblyx86real-mode

What's the difference between Virtual-8086 Mode and Real-Address Mode in x86 processor


In wikipedia, the explanation of virtual 8086 mode is said that

In the 80386 microprocessor and later, virtual 8086 mode (also called virtual real mode, V86-mode or VM86) allows the execution of real mode applications that are incapable of running directly in protected mode while the processor is running a protected mode operating system

I think this means that virtual 8086 mode can access to system memory and hardware devices.

And the explanation of real-address mode

Real mode, also called real address mode, is an operating mode of all x86-compatible CPUs. Real mode is characterized by a 20-bit segmented memory address space (giving exactly 1 MiB of addressable memory) and unlimited direct software access to all addressable memory, I/O addresses and peripheral hardware. Real mode provides no support for memory protection, multitasking, or code privilege levels

I think there is no difference between them. anybody knows it??


Solution

  • I think this means that virtual 8086 mode can access to system memory and hardware devices.

    No, not really. In virtual 8086 mode there is also a protected mode operating system (the one that set up the virtual part) running in the background and deciding what memory and devices you have access to. Some of the devices might also be virtual, and simulated by the system. Old graphics cards, for example.

    In real mode, the program runs directly on the real hardware - the way it did in the original 8086 (where this was the only mode). Even if there is an operating system, like PC-DOS, the application program still has unlimited access to all hardware and all memory. And can of course easily crash everything.