Changes

Jump to: navigation, search

6502 Math

188 bytes added, 01:54, 18 September 2023
Bitwise Operations
ASL Arithmetic shift left - bit 7 -> C flag, bits 0:6 -> 1:7, 0 -> bit 0
LSR Logical shift right - bit 0 -> C flag, bits 7:1 -> 6:0, 0 -> bit 7
EOR Exclusive-OR (synonym for sometimes written XORin other languages)
ORA OR (accumulator)
AND AND
The BIT instruction performs a bitwise AND, sets the Z flag based on the result, and transfers bits 6 and 7 of the operand into the N and V flags.
 
== Multiplication and Division ==
 
There are no multiplication or division instructions on the 6502; it is up to the programmer to provide the appropriate logic.

Navigation menu