1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Assembly Language: Determining an effective address

  1. Mar 10, 2013 #1


    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data

    If EAX contains 00000200H, EBX contains 00000003H, and the data segment contains 1000H, what is the effective address generated by this instruction?


    3. 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].
  2. jcsd
  3. Mar 10, 2013 #2


    User Avatar
    Homework Helper

    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted