Intel-32 Architecture
Last updated
Last updated
8088, 8086
→16 Bit registers
→ AX, BX, CX, DX, SI, DI, BP, SP, CS, DS, SS, ES, IP
80286
→ Protected Mode - OS runs in protected mode
→ Program cannot access other process’s space.
80386
→ Added 32 bit mode
→ Extends the registers. EAX, EBC, ECX.... etc
80486
→ Faster
Register → Registers are a type of computer memory used to quickly accept, store, and transfer data and instructions that are being used immediately by the CPU. Metaphorically, they can be seen as variables which will be used to store values in them and use later. Flags → The FLAGS register is the status register that contains the current state of a CPU
General Purpose Register
Segment Register
Flags, EIP
Floating Point Unit Registers
MMX Register
XMM Register
8 General Purpose
EAX
EBX
ECX
EDX
ESI
EDI
ESP
EBP
They are 32 bit
We can break register and access them in lower size.
EAX → 32 Bit
AX → Low 16 Bits of EAX
AL → Low 8 bits of AX
AH → High 8 bits of AX
Common functionality of them-
EAX → Accumulator
ECX → Counter for loops
EDX → EAX Multiply and Divide
ESI → Source Index
EDI → Destination Index
EBP → Base Pointer
ESP → Stack Pointer
EIP → Instruction Pointer. Points to current instruction to be executed.
Segment Register CS → Code segments DS → Data segments SS → Stack segment ES, FS, GS → Extra segments.
Memory model dependent (flat or segmented)
Flags register
They store info about a previous instruction that was executed.
CF → Carry Flag ZF → Zero Flag OF → Overflow Flag
FPU (Floating Point)
-x87 -They are 80 Bits -Behave like Stack
SIMD (Extensions) -MMX -SSE -SSE2 -SSE3
I-32 have 3 mode -Real Mode (Only 1MB Memory access, no memory protection, Privilege not possible) -Protected Mode (Upto 4GB Memory, memory protection/privilege etc) -System Management Mode (power management tasks)
Memory Model Flat Model Segmented Model Real address Model
Memory Diagram
Here, Text section contains Executable code.
Initialized Data is .data section containing Initialized data. Whereas Uninitialized data is .bss section containing Uninitialized data.