Gotchas: Difference between revisions

m
Line 28:
* Certain instructions, such as <code>INC</code> and <code>DEC</code>, read from a value and write back to it. This can count as two accesses to a memory-mapped port (if the port cares about that, not all do.) A simple <code>LDA</code> or <code>STA</code> represents a single access.
* Generally speaking, you'll only be able to use <code>STA</code>,<code>STX</code>, or <code>STY</code> to write to ports. You'll need to read the documentation for your hardware.
 
 
Some examples of bad memory-mapped port I/O for various hardware:
1,489

edits