Assembly Language: Determining an effective address

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
JJBladester
Gold Member
Messages
281
Reaction score
2

Homework Statement



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]

The Attempt at a Solution



I know that an effective address is created by adding the data segment (DS) value shifted left 4 bytes to the offset value.

In the question, I am given the values contained in EAX, EBX and DS but I do not know what ESI and DSI are set to, so how can I calculate the offset of ESI + DSI?

I know that [ESI][DSI] is another way of writing [ESI + DSI].
 
Physics news on Phys.org
There are multiple issues with this problem. As you mentioned, no values are given for ESI or EDI. Also normally 32 bit operations are done in protected mode, where normaly the address space is "flat" and the segment registers are not used to affect the virtual 32 bit addresses. In 16 bit real mode, 32 bit overrides can be used to perform 32 bit operations in 16 bit mode, but that is somewhat unusual, mostly done in the BIOS of a PC at boot time.