1,885
edits
Changes
no edit summary
=== Arithmetic and Bitwise Operations ===
{{Admon/tip|Watch the Carry Flag!|Failing to clear the carry flag before addition or to set the carry flag before subtraction is the cause of many bugs in 6502 programs. The carry flag also affects the rotate instructions. Be sure to set or clear this flag with the <code>SEC</code> or <code>CLC</code> instructions when needed!}}
'''For full details on all of the arithmetic and bitwise instructions, see the [[6502 Math]] page.'''
Note that in addition to these instructions, many other instructions (such as register loads) affect condition flags.
=== Program Flow ===