up: Chapter 13 -- Executing 80286 Protected-Mode Code
prev: Chapter 13 -- Executing 80286 Protected-Mode Code
next: 13.2 Two ways to Execute 80286 Tasks


13.1 80286 Code Executes as a Subset of the 80386

In general, programs designed for execution in protected mode on an 80286 execute without modification on the 80386, because the features of the 80286 are a subset of those of the 80386.

All the descriptors used by the 80286 are supported by the 80386 as long as the Intel-reserved word (last word) of the 80286 descriptor is zero.

The descriptors for data segments, executable segments, local descriptor tables, and task gates are common to both the 80286 and the 80386. Other 80286 -- segment, call gate, interrupt gate, and trap -- supported by the 80386. The 80386 also has new versions of descriptors for TSS segment, call gate, interrupt gate, and trap gate that support the 32-bit nature of the 80386. Both sets of descriptors can be used simultaneously in the same system.

For those descriptors that are common to both the 80286 and the 80386, the presence of zeros in the final word causes the 80386 to interpret these descriptors exactly as 80286 does; for example:

Base Address
The high-order eight bits of the 32-bit base address are zero, limiting base addresses to 24 bits.
Limit
The high-order four bits of the limit field are zero, restricting the value of the limit field to 64K.
Granularity bit
The granularity bit is zero, which implies that the value of the 16-bit limit is interpreted in units of one byte.
B-bit
In a data-segment descriptor, the B-bit is zero, implying that the segment is no larger than 64 Kbytes.
D-bit
In an executable-segment descriptor, the D-bit is zero, implying that 16-bit addressing and operands are the default.
For formats of these descriptors and documentation of their use refer to the iAPX 286 Programmer's Reference Manual.


up: Chapter 13 -- Executing 80286 Protected-Mode Code
prev: Chapter 13 -- Executing 80286 Protected-Mode Code
next: 13.2 Two ways to Execute 80286 Tasks