pgubook-readers
[Top][All Lists]
Advanced

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

Re: [Pgubook-readers] indexed addressing mode page 15 (revisited)


From: michael osullivan
Subject: Re: [Pgubook-readers] indexed addressing mode page 15 (revisited)
Date: Thu, 6 Oct 2011 21:23:55 +0100 (BST)

Hi,

I would just like to add  to what i said last.  What confused me was just why it was mentiond by the author that we should not forget that when we use  the value 3 as the index value we will be counting 0,1,2,3 . 

And next this is how my confused brain processed that little nugget of information:


When we jump to a memory address, which is offset by an index value; do we start counting from the address we are already in, or from the next address .

Hope i am making sense here., but if we start counting from the address we are at already, a whole word at a time, we arrive at the first byte of the next word.

-| if i start counting from the 1st specified address 1 word forward i end up in the
.|   in the last byte of the word  (location 4 below)
V_ _ _ _   _  _  _  _   _ _ _ _  _ _V_ _  _ _ _ _  
| _ 1 _ |  |_ _ 2 _ _|  |_ _3_ _ | |_ 4 _ | |_ _5_ _|
...........^                                               ^-----------------------------------------------------------|
........... |    if i however start counting frrom the the next location  (location2 here)   |
i end up in the first byte of the next word  (location 5 above) ---------------------------------| 

Which way is correct?


reply via email to

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