1. Not finding help here? Sign up for a free 30min 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!

Assembly Language: Determining an effective address

  1. Mar 10, 2013 #1

    JJBladester

    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?

    MOV ECX,[ESI][EDI]

    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

    rcgldr

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Assembly Language: Determining an effective address
  1. Assembly Language (Replies: 0)

  2. Assembly Language (Replies: 13)

Loading...