Difference between revisions of "Absolute Addressing"

From NES Hacker Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
  
 
==Opcodes==
 
==Opcodes==
Since ''Absolute'' addressing is essentially the same as ''Zero-Page'' addressing, the use the same opcodes. The following opcodes support absolute addressing:
+
Since ''Absolute'' addressing is essentially the same as ''Zero-Page'' addressing, they use the same opcodes. The following opcodes support absolute addressing:
  
 
{|
 
{|
Line 42: Line 42:
 
[[Category: Guides]]
 
[[Category: Guides]]
 
[[Category: Addressing Modes]]
 
[[Category: Addressing Modes]]
 +
[[Category:Assembly]]

Latest revision as of 17:55, 28 April 2013

In Zero-Page Addressing, the operand is a memory address rather than a value. Absolute addressing is very similar to Zero-Page Addressing, except that in absolute addressing you must supply the entire 2-byte address, while zero-page addressing only requires the low byte.


Examples

This example uses Absolute Addressing to load the accumulator with whatever value is stored in memory address $16A0. Notice that the address is store in little-endian.

0001:AD A0 16  LDA $16A0       ; Load A with whatever value is in memory address $16A0.


Opcodes

Since Absolute addressing is essentially the same as Zero-Page addressing, they use the same opcodes. The following opcodes support absolute addressing: