pgubook-readers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pgubook-readers] if anyone's home, a question from page 15


From: Brian Haag
Subject: [Pgubook-readers] if anyone's home, a question from page 15
Date: Thu, 4 Mar 2010 21:47:30 -0600

re: indexed addressing mode

In the example given, we specify address 2002 with 4 in the index register, giving us 2006 (the start of the second word).

For x86 processors we can use a multiplier, so putting 3 in the index register with a multiplier of 1 would get us the contents of address 2005.

However, the next example is a 3 in the index register with a multiplier of 4, resulting in reading from address 2014, the start of the fourth word.

Now, it's easy enough to see that 2002 + (3 x 1) = 2005, and 2002 + (3 x 4) = 2014.  What seems weird to me is that the multiplier determines WHERE
in the word I end up reading.  1 gets me the fourth byte, 2 the third, 3 the second, and 4 the first.

Am I thinking about this correctly?  Am I wrong to think it's a little weird?

Thanks, if anyone's actually listening.  :)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]