0% found this document useful (0 votes)
7 views9 pages

Lec24 CS344

The document discusses physical address calculation in computer systems using segmented memory addressing. It shows how a 16-bit segment and 16-bit offset are combined to form a 20-bit physical address. Examples are given of calculating effective addresses and physical addresses for memory references using segment registers and offsets.

Uploaded by

Ahmad Amin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views9 pages

Lec24 CS344

The document discusses physical address calculation in computer systems using segmented memory addressing. It shows how a 16-bit segment and 16-bit offset are combined to form a 20-bit physical address. Examples are given of calculating effective addresses and physical addresses for memory references using segment registers and offsets.

Uploaded by

Ahmad Amin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Computer Organization and

Assembly Language
Lecture 24
Physical Address Calculation
16-bit segment 16-bit offset

0000 0000
20-bit segment 20-bit offset
+

20-bit Physical Address


Address Calculation

1 D D D 0
0 0 1 0 0
+
1 D E D 0

20 –Bit Physical Address Calculation


Segment Base

16 – Bit Segment Register Value

0 0 0 0

0 0 0 0 0

20 – Bit Segment = 0 Decimal


Segment Base

16 – Bit Segment Register Value


0 0 0 1

0 0 0 1 0
20 – Bit Physical Address = 16 Decimal
Physical Address Calculation
[bx+0x7000] BX = 0x9100
DS = 0x1500
Effective Address =
EA = Base + Index + Offset
= 0x9100 + 0x0000 + 0x07000
= 0x10100 ; 17-bits !
= 0x0100 ; Segment wrap
; around
Physical Address Calculation
[bx+0x7000] BX = 0x9100
DS = 0x1500
Effective Address =
EA = 0x0100 ; Segment wrap
; around
Physical Address = Segment*0x10+EA
= 0x1500*0x10+0x100
= 0x15100
Physical Address Calculation
[bx+0x0100] BX = 0x0100
DS = 0xFFF0
Effective Address =
EA = Base + Index + Offset
= 0x0100 + 0x0000 + 0x0100
= 0x0200
Physical Address = Segment*0x10+EA
= 0xFFF0*0x10+0x0200
= 0x100100 ; 21-bits !
= 0x00100 ; memory wrap
; around
Segment Override Prefix

Instruction Opcode
mov ax,[cs:bx] 2E9B07
mov ax,[es:bx] 268B07
mov ax,[ss:bx] 368B07
mov ax,[bx] 8B07

You might also like