I was asked the following question, but I don't see how it has enough information to be answered.
"If EAX
contains 00000200H
, EBX
contains 00000003H
, and the data segment contains 1000H
, what is the effective address generated by this instruction?"
MOV ECX,[ESI][EDI]
How would I know what values were contained in the ESI
and EDI
registers? I know the ESI
and EDI
registers are typically used in string operations...
I also know the general format for creating effective addresses is:
1) Shift DS
four bits to the left.
2) Add the shifted DS
value to the offset value.
In the code snippet above, the offset is [ESI][EDI]
which I believe is the same as [ESI + EDI]
. I interpret [ESI][EDI]
to mean the following in English:
"The offset is equal to the value contained in the ESI
register added to the value contained in the EDI
register."
This is my first week in an 8-week x86 microprocessor course so I appreciate the feedback.