80386_part1
80386_part1
Microprocessor
Family
Introduction
Register Organization
General Purpose Registers
Segment Registers
Instruction Pointer and Flags
System Address Registers
Control Registers
Debug Registers
Test Registers.
General Purpose Registers
The six segment registers available in 80386 are CS, SS, DS, ES, FS and
GS.
The CS and SS are the code and the stack segment registers respectively,
while DS, ES, FS, GS are 4 data segment registers.
Instruction Pointer
The offset is always relative to the base of the code segment (CS).
The lower 16 bits of EIP contain the 16-bit instruction pointer named IP,
which is used by 16-bit addressing.
Flags Register
The defined bits and bit fields within EFLAGS, control certain
operations and indicate status of the Intel386 DX.
The lower 16 bits of EFLAGS contain the 16-bit flag register named
FLAGS, which is most useful when executing 8086 and 80286 code
EFlags Register
VM (Virtual 8086 Mode, bit 17)
It is a 16 bit register
The selector in TR is used to
locate a descriptor in the GDT.
This descriptor defines a block of Task
Descriptor
memory called the Task state
segment(TSS).
It does this by providing the
starting address (BASE) and the
size-LIMIT of the segment.
Every task has its own TSS (task
State segment)
The TSS holds the information
needed to initiate a task, such as
initial values for the user
accessible registers, a back link to
the previous task
Control Registers
PG - Paging Enable
Machine Status Word
ET – Extension Type
TS – Task Switched
EM – Emulate coprocessor
MP – Math Co-processor Present
PE – Protection Enable
CR0
CR1 and CR2
CR1: reserved
CR1 is reserved for use in future Intel processors.
CR2: Page Fault Linear Address
holds the 32-bit linear address that caused the last page
fault detected. A page fault occurs when a desired page in
not present in the physical memory
CR3: Page Directory Base Address
Debug Registers
8 debug registers for hardware debugging DR0 – DR7
DR4, DR5 – Intel reserved
DR0- DR3 – store four program controllable breakpoint
addresses
DR6, DR7 – hold breakpoint status, breakpoint control
information
Test Registers
Test control
Test status registers
Debug Registers