CS401 Assignment no 1 Solution 3

No Comments

Q  No 1 Solution:
(a)
Physical Address = Segment Address + Offset Address
16 bit segment Address = 5FD1
16 bit Offset Address = 111E
To convert it into 20 bit address adds 0 at the right side of segment address and left  side of Offset Address.
20 bit Segment Address = 5FD10
20 bit Offset Address = 0111E
Physical Address = 5FD10 + 0111E = 60E2E
(b)
Physical Address = Segment Address + Offset Address
16 bit segment Address = 91EF
16 bit Offset Address = F1F1
To convert it into 20 bit address adds 0 at the right side of segment address and left side of Offset Address.
20 bit Segment Address = 91EF0
20 bit Offset Address = 0F1F1
Physical Address = 91EF0 + 0F1F1= A10E1

Q  No 1 Solution:
(a)
Physical Address = Segment Address + Offset Address
16 bit segment Address = 5FD1
16 bit Offset Address = 111E
To convert it into 20 bit address adds 0 at the right side of segment address and left  side of Offset Address.
20 bit Segment Address = 5FD10
20 bit Offset Address = 0111E
Physical Address = 5FD10 + 0111E = 60E2E
(b)
Physical Address = Segment Address + Offset Address
16 bit segment Address = 91EF
16 bit Offset Address = F1F1
To convert it into 20 bit address adds 0 at the right side of segment address and left side of Offset Address.
20 bit Segment Address = 91EF0
20 bit Offset Address = 0F1F1
Physical Address = 91EF0 + 0F1F1= A10E1

Question No. 2
[org 0x0100]
mov ax, 4
mov bx, 9
mov cx, 6
add bx, ax
mov ax, bx
sub bx, cx
mov bx,cx
add ax, bx
mov dx, ax
EAX
[ax,dx],bx
mov ax, 0x4c00
int 0x21

Question No.2
001
002    [org 0x0100]
003    mov ax  , 4
004    mov bx ,  9
005    mov cx ,  6
006    add  bx ,  ax
007   mov  ax,  bx
008   sub  bx ,  cx
009   mov bx,  cx
010   add  ax , bx
011   mov dx ,ax
012   EAX
013   [ax,dx],bx
014    mov ax, 0x4c00
015    int 0x21

Next PostNewer Post Previous PostOlder Post Home

0 comments

Post a Comment