💾 Archived View for vigrey.com › 6502 captured on 2023-06-16 at 16:12:07. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-05-24)
-=-=-=-=-=-=-
Adds target memory value and Carry Flag (C) (1 if Carry flag is set [1] or 0 if Carry Flag is clear [0]) to A and stores the result into A
Mode: Immediate
Syntax: ADC #$12
Opcode: $69
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: ADC $12
Opcode: $65
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: ADC $12,X
Opcode: $75
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: ADC $1234
Opcode: $6D
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: ADC $1234,X
Opcode: $7D
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: Absolute,Y
Syntax: ADC $1234,Y
Opcode: $79
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: (Indirect,X)
Syntax: ADC ($12,X)
Opcode: $61
Bytes: 2
Cycles: 6
Mode: (Indirect),Y
Syntax: ADC ($12),Y
Opcode: $71
Bytes: 2
Cycles: 5 (+1 if page crossed)
Logical AND operation "A AND target memory" is performed and the result is stored into A
Mode: Immediate
Syntax: AND #$12
Opcode: $29
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: AND $12
Opcode: $25
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: AND $12,X
Opcode: $35
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: AND $1234
Opcode: $2D
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: AND $1234,X
Opcode: $3D
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: Absolute,Y
Syntax: AND $1234,Y
Opcode: $39
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: (Indirect,X)
Syntax: AND ($12,X)
Opcode: $21
Bytes: 2
Cycles: 6
Mode: (Indirect),Y
Syntax: AND ($12),Y
Opcode: $31
Bytes: 2
Cycles: 5 (+1 if page crossed)
Shifts all bits of target to the left by 1. 0 is shifted into bit 0 of the target and bit 7 of the target is shifted into Carry Flag (C).
Mode: Accumulator
Syntax: ASL
Opcode: $0A
Bytes: 1
Cycles: 2
Mode: Zero Page
Syntax: ASL $12
Opcode: $06
Bytes: 2
Cycles: 5
Mode: Zero Page,X
Syntax: ASL $12,X
Opcode: $16
Bytes: 2
Cycles: 6
Mode: Absolute
Syntax: ASL $1234
Opcode: $0E
Bytes: 3
Cycles: 6
Mode: Absolute,X
Syntax: ASL $1234,X
Opcode: $1E
Bytes: 3
Cycles: 7
If Carry Flag (C) is clear (0), add the argument value to Program Counter
Mode: Relative
Syntax: BCC $12
Opcode: $90
Bytes: 2
Cycles: 2 (+1 if branch succeeds +2 if to a new page)
If Carry Flag (C) is set (1), add the argument value to Program Counter
Mode: Relative
Syntax: BCS $12
Opcode: $B0
Bytes: 2
Cycles: 2 (+1 if branch succeeds +2 if to a new page)
If Zero Flag (Z) is set (1), add the argument value to Program Counter
Mode: Relative
Syntax: BEQ $12
Opcode: $F0
Bytes: 2
Cycles: 2 (+1 if branch succeeds +2 if to a new page)
Logical AND operation "A AND target memory" is performed
Mode: Zero Page
Syntax: BIT $12
Opcode: $24
Bytes: 2
Cycles: 3
Mode: Absolute
Syntax: BIT $1234
Opcode: $2C
Bytes: 3
Cycles: 4
If Negative Flag (N) is set (1), add the argument value to Program Counter
Mode: Relative
Syntax: BMI $12
Opcode: $30
Bytes: 2
Cycles: 2 (+1 if branch succeeds +2 if to a new page)
If Zero Flag (Z) is clear (0), add the argument value to Program Counter
Mode: Relative
Syntax: BNE $12
Opcode: $D0
Bytes: 2
Cycles: 2 (+1 if branch succeeds +2 if to a new page)
If Negative Flag (N) is clear (0), add the argument value to Program Counter
Mode: Relative
Syntax: BPL $12
Opcode: $10
Bytes: 2
Cycles: 2 (+1 if branch succeeds +2 if to a new page)
The Program Counter is pushed onto the stack and then Processor Status is pushed onto the stack. Stack Pointer is incremented by 3. Value at IRQ Interrupt Vector ($FFFE-$FFFF) is loaded into Program Counter and Break Command (B) is set (set to 1).
Mode: Implied
Syntax: BRK
Opcode: $00
Bytes: 1
Cycles: 7
If Overflow Flag (V) is clear (0), add the argument value to Program Counter
Mode: Relative
Syntax: BVC $12
Opcode: $50
Bytes: 2
Cycles: 2 (+1 if branch succeeds +2 if to a new page)
If Overflow Flag (V) is set (0), add the argument value to Program Counter
Mode: Relative
Syntax: BVS $12
Opcode: $70
Bytes: 2
Cycles: 2 (+1 if branch succeeds +2 if to a new page)
Clears Carry Flag (C) (sets to 0)
Mode: Implied
Syntax: CLC
Opcode: $18
Bytes: 1
Cycles: 2
Clears Decimal Mode Flag (D) (sets to 0). Decimal Mode Flag (D) value is uncertain at power-on.
Mode: Implied
Syntax: CLD
Opcode: $D8
Bytes: 1
Cycles: 2
Clears Interrupt Disable (I) (sets to 0)
Mode: Implied
Syntax: CLI
Opcode: $58
Bytes: 1
Cycles: 2
Clears Overflow Flag (V) (sets to 0)
Mode: Implied
Syntax: CLV
Opcode: $B8
Bytes: 1
Cycles: 2
Compares A to target memory value
Mode: Immediate
Syntax: CMP #$12
Opcode: $C9
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: CMP $12
Opcode: $C5
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: CMP $12,X
Opcode: $D5
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: CMP $1234
Opcode: $CD
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: CMP $1234,X
Opcode: $DD
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: Absolute,Y
Syntax: CMP $1234,Y
Opcode: $D9
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: (Indirect,X)
Syntax: CMP ($12,X)
Opcode: $C1
Bytes: 2
Cycles: 6
Mode: (Indirect),Y
Syntax: CMP ($12),Y
Opcode: $D1
Bytes: 2
Cycles: 5 (+1 if page crossed)
Compares X to target memory value
Mode: Immediate
Syntax: CPX #$12
Opcode: $E0
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: CPX $12
Opcode: $E4
Bytes: 2
Cycles: 3
Mode: Absolute
Syntax: CPX $1234
Opcode: $EC
Bytes: 3
Cycles: 4
Compares Y to target memory value
Mode: Immediate
Syntax: CPY #$12
Opcode: $C0
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: CPY $12
Opcode: $C4
Bytes: 2
Cycles: 3
Mode: Absolute
Syntax: CPY $1234
Opcode: $CC
Bytes: 3
Cycles: 4
Subtracts 1 from target memory value and stores the result into target memory
Mode: Zero Page
Syntax: DEC $12
Opcode: $C6
Bytes: 2
Cycles: 5
Mode: Zero Page, X
Syntax: DEC $12,X
Opcode: $D6
Bytes: 2
Cycles: 6
Mode: Absolute
Syntax: DEC $1234
Opcode: $CE
Bytes: 3
Cycles: 6
Mode: Absolute,X
Syntax: DEC $1234,X
Opcode: $DE
Bytes: 3
Cycles: 7
Subtracts 1 from X and stores the result into X
Mode: Implied
Syntax: DEX
Opcode: $CA
Bytes: 1
Cycles: 2
Subtracts 1 from Y and stores the result into X
Mode: Implied
Syntax: DEY
Opcode: $88
Bytes: 1
Cycles: 2
Logical XOR operation "A XOR target memory" is performed and the result is stored into A
Mode: Immediate
Syntax: EOR #$12
Opcode: $49
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: EOR $12
Opcode: $45
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: EOR $12,X
Opcode: $55
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: EOR $1234
Opcode: $4D
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: EOR $1234,X
Opcode: $5D
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: Absolute,Y
Syntax: EOR $1234,Y
Opcode: $59
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: (Indirect,X)
Syntax: EOR ($12,X)
Opcode: $41
Bytes: 2
Cycles: 6
Mode: (Indirect),Y
Syntax: EOR ($12),Y
Opcode: $51
Bytes: 2
Cycles: 5 (+1 if page crossed)
Adds 1 to target memory value and stores the result into target memory
Mode: Zero Page
Syntax: INC $12
Opcode: $E6
Bytes: 2
Cycles: 5
Mode: Zero Page,X
Syntax: INC $12,X
Opcode: $F6
Bytes: 2
Cycles: 6
Mode: Absolute
Syntax: INC $1234
Opcode: $EE
Bytes: 3
Cycles: 6
Mode: Absolute,X
Syntax: INC $1234,X
Opcode: $FE
Bytes: 3
Cycles: 7
Adds 1 to X and stores the result into X
Mode: Implied
Syntax: INX
Opcode: $E8
Bytes: 1
Cycles: 2
Adds 1 to Y and stores the result into Y
Mode: Implied
Syntax: INY
Opcode: $C8
Bytes: 1
Cycles: 2
Sets Program Counter to address specified by argument. Original 6502 processors mishandle (Indirect) JMP instructions if the low byte of the argument is $FF and will not correctly increment the high byte of the argument by 1. For example, JMP ($10FF) sets the low byte of Program Counter to the value at memory address $10FF, but sets the high byte of Program Counter to the value at memory address $1000 instead of $1100.
Mode: Absolute
Syntax: JMP $1234
Opcode: $4C
Bytes: 3
Cycles: 3
Mode: (Indirect)
Syntax: JMP ($1234)
Opcode: $6C
Bytes: 3
Cycles: 5
Pushes the Program Counter minus 1 onto the stack. Program Counter is then set to the argument value. Stack Pointer is incremented by 2.
Mode: Absolute
Syntax: JSR $1234
Opcode: $20
Bytes: 3
Cycles: 6
Loads value of target memory into A
Mode: Immediate
Syntax: LDA #$12
Opcode: $A9
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: LDA $12
Opcode: $A5
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: LDA $12,X
Opcode: $B5
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: LDA $1234
Opcode: $AD
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: LDA $1234,X
Opcode: $BD
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: Absolute,Y
Syntax: LDA $1234,Y
Opcode: $B9
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: (Indirect,X)
Syntax: LDA ($12,X)
Opcode: $A1
Bytes: 2
Cycles: 6
Mode: (Indirect),Y
Syntax: LDA ($12),Y
Opcode: $B1
Bytes: 2
Cycles: 5 (+1 if page crossed)
Loads value of target memory into X
Mode: Immediate
Syntax: LDX #$12
Opcode: $A2
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: LDX $12
Opcode: $A6
Bytes: 2
Cycles: 3
Mode: Zero Page,Y
Syntax: LDX $12,Y
Opcode: $B6
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: LDX $1234
Opcode: $AE
Bytes: 3
Cycles: 4
Mode: Absolute,Y
Syntax: LDX $1234,Y
Opcode: $BE
Bytes: 3
Cycles: 4 (+1 if page crossed)
Loads value of target memory into Y
Mode: Immediate
Syntax: LDY #$12
Opcode: $A0
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: LDY $12
Opcode: $A4
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: LDY $12,X
Opcode: $B4
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: LDY $1234
Opcode: $AC
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: LDY $1234,X
Opcode: $BC
Bytes: 3
Cycles: 4 (+1 if page crossed)
Shifts all bits of target to the right by 1. 0 is shifted into bit 7 of the target and bit 0 of the target is shifted into Carry Flag (C).
Mode: Accumulator
Syntax: LSR
Opcode: $4A
Bytes: 1
Cycles: 2
Mode: Zero Page
Syntax: LSR $12
Opcode: $46
Bytes: 2
Cycles: 5
Mode: Zero Page,X
Syntax: LSR $12, X
Opcode: $56
Bytes: 2
Cycles: 6
Mode: Absolute
Syntax: LSR $1234
Opcode: $4E
Bytes: 3
Cycles: 6
Mode: Absolute,X
Syntax: LSR $1234,X
Opcode: $5E
Bytes: 3
Cycles: 7
No changes happen to the processor besides the normal incrementing of Program Counter to the next instruction.
Mode: Implied
Syntax: NOP
Opcode: $EA
Bytes: 1
Cycles: 2
Logical OR operation "A OR target memory" is performed and the result is stored into A
Mode: Immediate
Syntax: ORA #$12
Opcode: $09
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: ORA $12
Opcode: $05
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: ORA $12,X
Opcode: $15
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: ORA $1234
Opcode: $0D
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: ORA $1234,X
Opcode: $1D
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: Absolute,Y
Syntax: ORA $1234,Y
Opcode: $19
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: (Indirect,X)
Syntax: ORA ($12,X)
Opcode: $01
Bytes: 2
Cycles: 6
Mode: (Indirect),Y
Syntax: ORA ($12),Y
Opcode: $11
Bytes: 2
Cycles: 5 (+1 if page crossed)
Pushes copy of the A onto the stack. Stack Pointer is incremented by 1.
Mode: Implied
Syntax: PHA
Opcode: $48
Bytes: 1
Cycles: 3
Pushes copy of Processor Status onto stack. Stack Pointer is incremented by 1.
Mode: Implied
Syntax: PHP
Opcode: $08
Bytes: 1
Cycles: 3
Pops 1 byte from the stack and stores it into A. Stack pointer is decremented by 1.
Mode: Implied
Syntax: PHP
Opcode: $68
Bytes: 1
Cycles: 4
Pops 1 byte from the stack and Processor Status is set to that 1 byte. Stack pointer is decremented by 1.
Mode: Implied
Syntax: PLP
Opcode: $28
Bytes: 1
Cycles: 4
Shifts all bits of target to the left by 1. Carry Flag (C) value is shifted into bit 0 of the target and bit 7 of the target is shifted into Carry Flag (C).
Mode: Accumulator
Syntax: ROL
Opcode: $2A
Bytes: 1
Cycles: 2
Mode: Zero Page
Syntax: ROL $12
Opcode: $26
Bytes: 2
Cycles: 5
Mode: Zero Page,X
Syntax: ROL $12,X
Opcode: $36
Bytes: 2
Cycles: 6
Mode: Absolute
Syntax: ROL $1234
Opcode: $2E
Bytes: 3
Cycles: 6
Mode: Absolute,X
Syntax: ROL $1234,X
Opcode: $3E
Bytes: 3
Cycles: 7
Shifts all bits of target to the right by 1. Carry Flag (C) value is shifted into bit 7 of the target and bit 0 of the target is shifted into Carry Flag (C).
Mode: Accumulator
Syntax: ROR
Opcode: $6A
Bytes: 1
Cycles: 2
Mode: Zero Page
Syntax: ROR $12
Opcode: $66
Bytes: 2
Cycles: 5
Mode: Zero Page,X
Syntax: ROR $12,X
Opcode: $76
Bytes: 2
Cycles: 6
Mode: Absolute
Syntax: ROR $1234
Opcode: $6E
Bytes: 3
Cycles: 6
Mode: Absolute,X
Syntax: ROR $1234,X
Opcode: $7E
Bytes: 3
Cycles: 7
Pops 1 byte from the stack and sets Processor Status to that byte, then pops 2 more bytes from the stack and sets Program Counter to those 2 bytes. Stack pointer is decremented by 3.
Mode: Implied
Syntax: RTI
Opcode: $40
Bytes: 1
Cycles: 6
Pops 2 bytes from the stack and sets Program Counter to those 2 bytes. Program Counter is then incremented by 1. Stack Pointer is decremented by 2.
Mode: Implied
Syntax: RTS
Opcode: $60
Bytes: 1
Cycles: 6
Subtracts target memory value and the NOT of Carry Flag (C) (1 if Carry flag is clear [0] or 0 if Carry Flag is set [1]) from A and stores the result into A
Mode: Immediate
Syntax: SBC #$12
Opcode: $E9
Bytes: 2
Cycles: 2
Mode: Zero Page
Syntax: SBC $12
Opcode: $E5
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: SBC $12,X
Opcode: $F5
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: SBC $1234
Opcode: $ED
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: SBC $1234,X
Opcode: $FD
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: Absolute,Y
Syntax: SBC $1234,Y
Opcode: $F9
Bytes: 3
Cycles: 4 (+1 if page crossed)
Mode: (Indirect,X)
Syntax: SBC ($12,X)
Opcode: $E1
Bytes: 2
Cycles: 6
Mode: (Indirect),Y
Syntax: SBC ($12),Y
Opcode: $F1
Bytes: 2
Cycles: 5 (+1 if page crossed)
Sets Carry Flag (C) (sets to 1)
Mode: Implied
Syntax: SEC
Opcode: $38
Bytes: 1
Cycles: 2
Sets Decimal Mode Flag (D) (sets to 1). Decimal Mode Flag (D) value is uncertain at power-on.
Mode: Implied
Syntax: SED
Opcode: $F8
Bytes: 1
Cycles: 2
Sets Interrupt Disable (I) (sets to 1)
Mode: Implied
Syntax: SEI
Opcode: $78
Bytes: 1
Cycles: 2
Stores value of A into target memory
Mode: Zero Page
Syntax: STA $12
Opcode: $85
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: STA $12,X
Opcode: $95
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: STA $1234
Opcode: $8D
Bytes: 3
Cycles: 4
Mode: Absolute,X
Syntax: STA $1234,X
Opcode: $9D
Bytes: 3
Cycles: 5
Mode: Absolute,Y
Syntax: STA $1234,Y
Opcode: $99
Bytes: 3
Cycles: 5
Mode: (Indirect,X)
Syntax: STA ($12,X)
Opcode: $81
Bytes: 2
Cycles: 6
Mode: (Indirect),Y
Syntax: STA ($12),Y
Opcode: $91
Bytes: 2
Cycles: 6
Stores value of X into target memory
Mode: Zero Page
Syntax: STX $12
Opcode: $86
Bytes: 2
Cycles: 3
Mode: Zero Page,Y
Syntax: STA $12,Y
Opcode: $96
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: STA $1234
Opcode: $8E
Bytes: 3
Cycles: 4
Stores content of Y into target memory
Mode: Zero Page
Syntax: STX $12
Opcode: $84
Bytes: 2
Cycles: 3
Mode: Zero Page,X
Syntax: STA $12,X
Opcode: $94
Bytes: 2
Cycles: 4
Mode: Absolute
Syntax: STA $1234
Opcode: $8C
Bytes: 3
Cycles: 4
Copies value of A and stores it into X
Mode: Implied
Syntax: TAX $12
Opcode: $AA
Bytes: 1
Cycles: 2
Copies value of A and stores it into Y
Mode: Implied
Syntax: TAY $12
Opcode: $A8
Bytes: 1
Cycles: 2
Copies value of Stack Pointer and stores it into X
Mode: Implied
Syntax: TSX $12
Opcode: $BA
Bytes: 1
Cycles: 2
Copies value of X and stores it into A
Mode: Implied
Syntax: TXA $12
Opcode: $8A
Bytes: 1
Cycles: 2
Copies value of X and stores it into Stack Pointer
Mode: Implied
Syntax: TXS $12
Opcode: $9A
Bytes: 1
Cycles: 2
Copies value of Y and stores it into A
Mode: Implied
Syntax: TYA $12
Opcode: $98
Bytes: 1
Cycles: 2