2081 9

CSC167 ยท 2081 ยท 5 marks

Explain Register Organization in 80386 microprocessor.

Explain Register Organization in 80386 microprocessor. [5]

MicroprocessorChapter 7: Advanced Microprocessors80386

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.

RegisterFull NameDescription
EAXExtended AccumulatorUsed for arithmetic and I/O operations
EBXExtended Base RegisterUsed as base pointer for memory addressing
ECXExtended Count RegisterUsed as loop counter
EDXExtended Data RegisterUsed in I/O and multiply/divide operations
ESIExtended Source IndexSource pointer in string operations
EDIExtended Destination IndexDestination pointer in string operations
EBPExtended Base PointerPoints to base of stack frame
ESPExtended Stack PointerPoints 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:

RegisterNamePurpose
CSCode SegmentHolds address of code segment
DSData SegmentHolds address of data segment
SSStack SegmentHolds address of stack segment
ESExtra SegmentExtra data segment
FSF SegmentAdditional data segment
GSG SegmentAdditional data segment

3. Control Registers

RegisterPurpose
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:

RegisterNamePurpose
CR0 - CR3Control RegistersControl operating mode and paging
GDTRGlobal Descriptor Table RegisterPoints to global descriptor table
LDTRLocal Descriptor Table RegisterPoints to local descriptor table
IDTRInterrupt Descriptor Table RegisterPoints to interrupt descriptor table
TRTask RegisterPoints 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.