Real Mode

When the 80386 is powered up or re-initialized via a hardware reset, the processor is set into real mode. In real mode, the 80386 effectively operates as a 16-bit processor. While in real mode the 80386 is emulating an 8086 processor. Program addresses correspond directly to physical memory addresses. Memory is addressed using the segmented memory model only (paging is not supported), and the system's physical address space is limited to 1MB of real memory. Virtual memory is not supported in real mode.

While running in real mode, the Intel 80386 does not implement any memory protection scheme. Real mode is not suitable for running multiple applications concurrently. When more than one program is loaded at a time, there is the possibility of one program accessing another program's memory. Also there is no protection for the operating system code, and application programs can overwrite operating system code and data.

Segment registers are used to supply the base address for each type of memory segment (DS - data segment, CS - code segment, SS - stack segment and ES - extra segment). Figure "Real Mode Addressing" shows how a segment is addressed in real mode.

Each memory reference consists of a 16-bit segment address and a 16-bit offset. The processor automatically adds four binary zeros to the segment selector value (equivalent to multiplying by 16) to obtain a segment base address in memory. Thus, a segment may start on any 16-byte boundary within the 1MB physical address space.

The required memory location within the segment is determined by adding the offset to the segment base address. Since the offset is 16 bits in length, the maximum offset (and therefore the maximum size of a segment) is 64KB.


[Back: Memory Addressing]
[Next: Protected Mode (Segmented Memory Model)]