Talk:CPU addressing modes

From NESdev Wiki
Jump to navigationJump to search

(d),y addressing typo

For (d),y adressing, shouldn't the formula be:

PEEK(PEEK(arg) + (PEEK((arg + 1) % 256) * 256) + y)

instead of

PEEK(PEEK(arg) + PEEK((arg + 1) % 256) + y)

?

— Preceding unsigned comment added by 135.23.206.197 (talkcontribs)

Yes. Amended. - Rainwarrior (talk) 15:39, 9 February 2016 (MST)

Phrasing doesn't match table

The line:

"The (d),y mode is used far more often than (d,x)."

Should be modified to match the declaration pattern in the proceeding table, as follows:

"The (d,y) mode is used far more often than (d,x)." --SirGouki

There is no (d,y) mode. —Lidnariq (talk) 11:48, 22 April 2021 (MDT)
To clarify, there are two different addressing modes which perform indexing and indirection: one performs indexing first and indirection second (and uses the X register), and the other performs indirection first and indexing second (and uses the Y register). The first one effectively lets you use an array of pointers to individual bytes (which isn't very useful), but the second one is equivalent to having a single pointer to a 256-byte array (which is extremely useful). Furthermore, the table doesn't say "(d,y)" as you claim, but says "(d),y" as it should. --Quietust (talk) 06:58, 23 April 2021 (MDT)