CS:IP in 8086 Microprocessor
Definition
CS:IP is used to locate the next instruction to be executed in memory.
Components
- CS (Code Segment): Holds the base address of the code segment
- IP (Instruction Pointer): Holds the offset of the instruction within the segment
Address Calculation
The physical address is calculated as:
Physical Address = (CS × 16) + IP
CS is shifted left by 4 bits (multiplied by 16), then IP is added.
Example
If:
- CS = 2000H
- IP = 3456H
Physical Address = 2000H × 10H + 3456H
= 20000H + 3456H
= 23456H
So, the instruction is fetched from memory location 23456H.
Importance
- Determines the next instruction location
- Automatically updates during execution
- Essential for program control flow
Summary
- CS: Segment (base address)
- IP: Offset (location inside segment)
- CS:IP: Complete memory address