CSC167 ยท 2081 ยท 5 marks
Explain Register Organization in 80386 microprocessor.
Explain Register Organization in 80386 microprocessor. [5]
Quick answer
The Intel 80386 is a 32-bit microprocessor. Its registers are organized into the following groups: Each 32-bit register can also be accessed as a 16-bit register (AX, BX, CX, DX, SP, BP, SI, DI); AX, BX, CX, DX can further be split into 8-bit high and low bytes (AH/AL, BH/BL, CH/CL, DH/DL); CF - Carry Flag.
Register Organization in 80386 Microprocessor
Register Organization of 80386 Microprocessor
The Intel 80386 is a 32-bit microprocessor. Its registers are organized into the following groups:
1. General Purpose Registers (32-bit)
These registers are used for arithmetic, logical, and data transfer operations.
| Register | Full Name | Description |
|---|---|---|
| EAX | Extended Accumulator | Used for arithmetic and I/O operations |
| EBX | Extended Base Register | Used as base pointer for memory addressing |
| ECX | Extended Count Register | Used as loop counter |
| EDX | Extended Data Register | Used in I/O and multiply/divide operations |
| ESI | Extended Source Index | Source pointer in string operations |
| EDI | Extended Destination Index | Destination pointer in string operations |
| EBP | Extended Base Pointer | Points to base of stack frame |
| ESP | Extended Stack Pointer | Points to top of the stack |
- Each 32-bit register can also be accessed as a 16-bit register (AX, BX, CX, DX, SP, BP, SI, DI).
- AX, BX, CX, DX can further be split into 8-bit high and low bytes (AH/AL, BH/BL, CH/CL, DH/DL).
2. Segment Registers (16-bit)
The 80386 uses segmented memory model. It has 6 segment registers:
| Register | Name | Purpose |
|---|---|---|
| CS | Code Segment | Holds address of code segment |
| DS | Data Segment | Holds address of data segment |
| SS | Stack Segment | Holds address of stack segment |
| ES | Extra Segment | Extra data segment |
| FS | F Segment | Additional data segment |
| GS | G Segment | Additional data segment |
3. Control Registers
| Register | Purpose |
|---|---|
| EIP (32-bit) | Extended Instruction Pointer - holds address of next instruction to execute |
| EFLAGS (32-bit) | Extended Flags Register - holds status, control, and system flags |
Important flags in EFLAGS:
- CF - Carry Flag
- ZF - Zero Flag
- SF - Sign Flag
- OF - Overflow Flag
- DF - Direction Flag (for string operations)
- IF - Interrupt Enable Flag
4. System Registers
These are used for memory management and protection in protected mode:
| Register | Name | Purpose |
|---|---|---|
| CR0 - CR3 | Control Registers | Control operating mode and paging |
| GDTR | Global Descriptor Table Register | Points to global descriptor table |
| LDTR | Local Descriptor Table Register | Points to local descriptor table |
| IDTR | Interrupt Descriptor Table Register | Points to interrupt descriptor table |
| TR | Task Register | Points to current task state segment |
Summary Diagram
80386 Registers
โโโ General Purpose (EAX, EBX, ECX, EDX, ESI, EDI, EBP, ESP) -- 32-bit
โโโ Segment Registers (CS, DS, SS, ES, FS, GS) -- 16-bit
โโโ Control Registers (EIP, EFLAGS) -- 32-bit
โโโ System Registers (CR0-CR3, GDTR, LDTR, IDTR, TR)
Key Feature
The 80386 supports backward compatibility - programs written for 8086/80286 can run on 80386 because the lower 16-bit portions of the registers (AX, BX, etc.) are preserved within the 32-bit extended registers (EAX, EBX, etc.).
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.