Reputation: 33
Following are the register values for Intel microprocessor:
CX: FF0A
BX: AB5D
DI: BDEF
DX: 1234
DS: CC20
SP: CD0F
Instruction:
ADD [BX+DI], CX
MOV DX, [SP+1652H]
I want to know how to calculate the physical address of the above mentioned two instructions.
Upvotes: 1
Views: 4720
Reputation: 559
For 1. ADD [BX+DI], CX You will need to calculate the Effective Address first.
Effective Addressing = Base + Index + Offset
Then, the physical addressing would be: Physical Addressing = segmentation * 0x10 + The Effective Addressing
In your case, Base will be the value of bx, index will be the value of di, and offset will be empty. Now calculate by yourself.
Upvotes: 1