Jump to content

Category:6502 Assembly: Difference between revisions

m
Line 30:
* It is possible that a port that can be read, will be altered after reading it. Furthermore, writing to one port can alter the contents in another. This is often seen in video RAM ports, where writing to the port responsible for storing background graphics will auto-increment the value stored in the port responsible for deciding where those graphics will be stored. (This is how the NES's picture processing unit operates.)
 
* Writing to ports with commands other than <code>LDA/LDX/LDY</code> willcan eithersometimes fail or result in undefined behavior. For example, <code>INC</code> or <code>DEC</code> may not have the desired result.
 
* Some registers can only be written to by bit shifting, these so-called "shift registers" require you to load a value into the accumulator, then repeatedly alternating between <code>ROR</code>ing the accumulator and <code>ROL</code>ing the port.
1,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.