Category:6502 Assembly: Difference between revisions

no edit summary
mNo edit summary
No edit summary
Line 18:
On the 65816, the zero page is called the "direct page," and it can be relocated. The 65816's D register points to the direct page. The location of the direct page can be changed at runtime using the <code>TCD</code> command. This feature lets the programmer set up different pages of RAM for different tasks, and switch the direct page to that page temporarily to speed up that task.
 
==Little-Endian==
The 6502 is little-endian, meaning that the bytes are stored backwards. For example, the instruction <code>LDA $3056</code> converts to the following bytes: <code>$AD $56 $30</code> (the $AD is the LDA instruction and the other two are the operand.) Understanding this concept is very important when loading 16-bit values into consecutive zero-page addresses for indirect addressing modes. Unlike the z80 and 8086 there are no 16 bit registers on the 6502. (Those systems are also little-endian but it's not as relevant since loading a value into a 16 bit register will arrange the bytes in the intended order automatically.)
 
==Ports==
1,489

edits