Compute the physical address for the specified operand in each of the following instructions.The register contents and variable are as follows: (CS)=0A00H, (DS)=0B00H,
Question:
None Q: Compute the physical address for the specified operand in each of the following instructions.The register contents and variable are as follows: (CS)=0A00H, (DS)=0B00H, (SS)=0D00H,(SI)=OFF0H, (DI)=00BOH, (BP)=00EAH and (IP)=0000H, LIST=00F0H, AX=4020H, BX=2500H.1) Destination operand of the instructionMOV LIST [BP+DI] , AX2) Source operand of the instructionMOV CL, [BX+200H]3) Destination operand of the instructionMOV [DI+6400H] , DX4) Source operand of the instructionMOV AL, [BP+SI-400H]Step 1
Given question has asked to compute the physical address for specific operand in given instruction
The register contents and variable are as follows:
(CS)=0A00H
(DS)=0B00H
(SS)=0D00H
(SI)=0FF0H
(DI)=00B0H
(BP)=00EAH
(IP)=0000H
LIST=00F0H
AX=4020H
BX=2500H
1) MOV LIST[BP+DI],AX
2) MOV CL,[BX+200]
3) MOV AL,[BP+SI-400]
Step 2
1) MOV LIST[BP+DI],AX
This is an example of Base indexed addressing mode-
Here, destination operand physical address is calculated as base register plus an index register.
Given instruction moves data from AX to address pointed by (BP+DI) in LIST segment.
(DI)=00B0H
(BP)=00EAH
LIST=00F0H
So, physical address of destination operand, PA= LIST*10H+BP+DI
=0F00H+00EAH+00B0H
=109A
Step 3
2. MOV CL,[BX+200]
This is an example of Base indexed relative addressing mode-
Here, source operand physical address is calculated as base register plus an index register.
Given instruction moves data from the address pointed by (BX+200) in Data segment(DS) to CL register.
BX=2500H
(DS)=0B00H
So, physical address of source operand, PA =DS*10H+BX+200
=B000H+2500H+200
=B200H
Step 4
3.MOV[DI+6400H],DX
This is an example of Base indexed addressing mode-
Here, destination operand physical address is calculated as displacement plus an index register.
Given instruction moves data from DX to address pointed by (DI+6400H) in data segment segment.
(DI)=00B0H
(DS)=0B00H
So, physical address of destination operand, PA= DS*10H+DI+6400H
=0B00H*10+00B0H+6400H
=B000H+00B0H+6400H
=114B0
Step 5
4.MOV AL,[BP+SI-400]
Here, source operand physical address is calculated as base register plus an index register and subtracting displacement.
Given instruction moves data from the address pointed by (BP+SI-400) in Data segment(DS) to AL register.
(BP)=00EAH
(SI)=0FF0H
(DS)=0B00H
So, physical address of source operand, PA =DS*10H+BP+SI-400
=B000H+00EAH+0FF0H-400
=BCDAH