TechNote
Number: 04507-01
Date: April 1994
CPU addressing modes
The Intel microprocessor in every personal computer supports one or more of the following
modes:
- Real mode
- Protected mode
- Native 386 mode
- Virtual 8086 mode
Real mode
Real mode is so named because the addresses that the application program requests
translate to the same physical addresses in memory. Real mode allows the microprocessor
to address up to 1Mbyte of memory. It is the mode that the 8088/8086 microprocessors in the
first personal computers used and is the default mode for all Intel microprocessors, that is,
the microprocessor is always in the real mode after the computer is turned on and before any
operating system starts.
Real mode does not offer any memory protection. Any application can write to any location in
memory. Therefore, real mode limits multitasking, because two applications may not be able
to co-exist. Also, real mode does not support virtual memory. For information
on virtual memory, refer to TechNote 04505.
To maintain backward-compatibility, 80286, 80386, and 80486 microprocessors can emulate
the 8086 microprocessor, making them very fast 8086 real mode computers. However, in
this mode, the memory management and protection features in these microprocessors are
not used.
Protected mode
Protected mode is so named because, in a multitasking environment, the microprocessor
manages the memory so that each program is protected from interference from other
programs running at the same time. 80286 or later microprocessors support protected mode.
They have built-in memory management functions. Multitasking operating systems that use
protected mode include OS/2, UNIX, Novell NetWare, and Banyan Vines.
In protected mode, the physical address is formed from a "selector" and an "offset". The
selector is a 16-bit value that, rather than containing a real memory address, points to a
descriptor table, which contains the starting address of a segment in real memory, its length,
and access rights. The access rights protect the memory. The offset, which is also a 16-bit
value, is added to this information to form the physical address.
Protected mode also supports virtual memory. By using the selector value and the offset
value, the operating system can address up to 1Gbyte of virtual memory (for 80286
microprocessors) and up to 64Tbytes (for 80386 and 80486 microprocessors).
In computers with 80286 or later microprocessors, the combination of the operating system
and application that the computer uses determines whether the microprocessor stays in real
mode or whether it switches to protected mode. When a computer runs DOS, the
microprocessor stays in real mode. DOS makes only limited use of the capabilities that are
provided by protected mode. When OS/2 starts, it switches the microprocessor to protected
mode, and takes advantage of the virtual memory and multitasking capabilities that
protected mode provides.
Native 386 mode
This mode enables 80386 or 80486 microprocessors to use the full 32-bit architecture in a
form of real mode. However, the memory management and protection features of the
microprocessor are not used. Novell NetWare/386 uses this mode.
Virtual 8086 mode
80386 and 80486 microprocessors also support virtual 8086 mode. This is a special subset of
the protected mode in which the microprocessor simulates multiple 8086 microprocessors
running simultaneously. Therefore, application programs written for 8088 and 8086
microprocessors can run at the same time, as if they were in protected mode. OS/2 version
2.0 and Microsoft Windows in Enhanced mode use virtual 8086 mode to run multiple DOS
applications.