University of Salahaddin College of Engineering Software & Informatics Dep
University of Salahaddin College of Engineering Software & Informatics Dep
College of Engineering
Software & Informatics Dep.
COMPUTER ARCHITECTURE
2 N D S TA G E
A S S I S TA N T L E C T U R E R : E S I L S E M I R K H U R S H E D
[Lec 3]
2020 – 2019
Memory Segmentation
• Total memory size is divided into segments of
various sizes.
• Memory data is stored as bytes.
• 8086 has 20 lines address bus.
• With 20 add line the memory can be
addressed as 220 bytes = 1MB
• Address ranging from 00000F to FFFFF H
Segment Registers of 8086 (cont..)
16-bit register containing address of 64 KB segment
1. Code segment (CS)
Processor use it for all accesses to instructions referenced by
instruction pointer (IP) .
The CS register is automatically updated during jump, call and
return instructions.
2. Stack segment (SS)
Used in the stack processing .
used two registers to referencing to it :
SP : Stack pointer
BP: Base pointer
Segment Registers of 8086 (cont..)
Example :
let segment register=1000
Start Location = shift to left one hexadecimal digit
To be (10000 h)
End location= start location + FFFF h
So the end of this segment to be 1FFFF h.
Shift left
• 1000 H 10000 H
+ FFFF
1FFFF
More Examples:
Segment Register Start End
•
2000H
2001 H
2100 H
AB00 H
1234 H
Default Segment and Offset Registers
sol:
Physical Address = 20000+3000=23000 H to
addressing 1 M of memory from registers
consist of only 16 bit.
Home work: