Changes

Jump to: navigation, search

6502

694 bytes added, 6 September
/* Opcode Matrix */
== Opcode Matrix ==
Opcode quadrants are mostly: <span style="background-color: #ff6666;">'''Control instructions'''</span>, <span style="background-color: #66ff66;">'''ALU instructions'''</span>, <span style="background-color: #6666ff;">'''Read-Modify-Write instructions'''</span>. Uncolored quadrant is illegal instructions.
{| class="wikitable" style="white-space: nowrap;"
!rowspan=2| High nibble ||colspan=16| Low nibble
|-
! style="background-color:#ff6666;"|0! style="background-color:#ff6666;"|4! style="background-color:#ff6666;"| 18! style="background-color:#ff6666;"|C! style="background-color:#66ff66;"| 21! style="background-color:#66ff66;"|5! style="background-color:#66ff66;"| 39! style="background-color:#66ff66;"|D! style="background-color:#6666ff;"| 42! style="background-color:#6666ff;"|6! style="background-color:#6666ff;"| 5A! style="background-color:#6666ff;"|E! | 63! || 7! || 8|| 9|| A|| B! || C|| D|| E|| F
|-
! 0
| bgcolor=#e0e0e0|BRK
| bgcolor=#ffe0ff|ORA (''ind'',X)
| JAM
| SLO (''ind'',X)
| NOP ''zpg''
| bgcolor=#ffe0e0|ORA ''zpg''
| bgcolor=#ffe0e0|ASL ''zpg''
| SLO ''zpg''
| bgcolor=#e0e0e0|PHP
| bgcolor=#e0ffe0|ORA #
| bgcolor=#e0e0e0|ASL A
| ANC #
| NOP ''abs''
| bgcolor=#ffe0ff|ORA (''ind'',X)
| bgcolor=#ffe0e0|ORA ''zpg''
| bgcolor=#e0ffe0|ORA #
| bgcolor=#e0ffff|ORA ''abs''
| JAM
| bgcolor=#ffe0e0|ASL ''zpg''
| bgcolor=#e0e0e0|ASL A
| bgcolor=#e0ffff|ASL ''abs''
| SLO (''ind'',X)
| SLO ''zpg''
| ANC #
| SLO ''abs''
|-
! 1
| bgcolor=#ffffe0|BPL ''rel''
| bgcolor=#ffe0ff|ORA (''ind''),Y
| JAM
| SLO (''ind''),Y
| NOP ''zpg'',X
| bgcolor=#ffe0e0|ORA ''zpg'',X
| bgcolor=#ffe0e0|ASL ''zpg'',X
| SLO ''zpg'',X
| bgcolor=#e0e0e0|CLC
| bgcolor=#e0ffff|ORA ''abs'',Y
| NOP
| SLO ''abs'',Y
| NOP ''abs'',X
| bgcolor=#ffe0ff|ORA (''ind''),Y
| bgcolor=#ffe0e0|ORA ''zpg'',X
| bgcolor=#e0ffff|ORA ''abs'',Y
| bgcolor=#e0ffff|ORA ''abs'',X
| JAM
| bgcolor=#ffe0e0|ASL ''zpg'',X
| NOP
| bgcolor=#e0ffff|ASL ''abs'',X
| SLO (''ind''),Y
| SLO ''zpg'',X
| SLO ''abs'',Y
| SLO ''abs'',X
|-
! 2
| bgcolor=#e0ffff|JSR ''abs''
| bgcolor=#ffe0ff|AND (''ind'',X)
| JAM
| RLA (''ind'',X)
| bgcolor=#ffe0e0|BIT ''zpg''
| bgcolor=#ffe0e0|AND ''zpg''
| bgcolor=#ffe0e0|ROL ''zpg''
| RLA ''zpg''
| bgcolor=#e0e0e0|PLP
| bgcolor=#e0ffe0|AND #
| bgcolor=#e0e0e0|ROL A
| ANC #
| bgcolor=#e0ffff|BIT ''abs''
| bgcolor=#ffe0ff|AND (''ind'',X)
| bgcolor=#ffe0e0|AND ''zpg''
| bgcolor=#e0ffe0|AND #
| bgcolor=#e0ffff|AND ''abs''
| JAM
| bgcolor=#ffe0e0|ROL ''zpg''
| bgcolor=#e0e0e0|ROL A
| bgcolor=#e0ffff|ROL ''abs''
| RLA (''ind'',X)
| RLA ''zpg''
| ANC #
| RLA ''abs''
|-
! 3
| bgcolor=#ffffe0|BMI ''rel''
| bgcolor=#ffe0ff|AND (''ind''),Y
| JAM
| RLA (''ind''),Y
| NOP ''zpg'',X
| bgcolor=#ffe0e0|AND ''zpg'',X
| bgcolor=#ffe0e0|ROL ''zpg'',X
| RLA ''zpg'',X
| bgcolor=#e0e0e0|SEC
| bgcolor=#e0ffff|AND ''abs'',Y
| NOP
| RLA ''abs'',Y
| NOP ''abs'',X
| bgcolor=#ffe0ff|AND (''ind''),Y
| bgcolor=#ffe0e0|AND ''zpg'',X
| bgcolor=#e0ffff|AND ''abs'',Y
| bgcolor=#e0ffff|AND ''abs'',X
| JAM
| bgcolor=#ffe0e0|ROL ''zpg'',X
| NOP
| bgcolor=#e0ffff|ROL ''abs'',X
| RLA (''ind''),Y
| RLA ''zpg'',X
| RLA ''abs'',Y
| RLA ''abs'',X
|-
! 4
| bgcolor=#e0e0e0|RTI
| NOP ''zpg''
| bgcolor=#e0e0e0|PHA
| bgcolor=#e0ffff|JMP ''abs''
| bgcolor=#ffe0ff|EOR (''ind'',X)
| bgcolor=#ffe0e0|EOR ''zpg''
| bgcolor=#e0ffe0|EOR #
| bgcolor=#e0ffff|EOR ''abs''
| JAM
| bgcolor=#ffe0e0|LSR ''zpg''
| bgcolor=#e0e0e0|LSR A
| bgcolor=#e0ffff|LSR ''abs''
| SRE (''ind'',X)
| NOP ''zpg''
| bgcolor=#ffe0e0|EOR ''zpg''
| bgcolor=#ffe0e0|LSR ''zpg''
| SRE ''zpg''
| bgcolor=#e0e0e0|PHA
| bgcolor=#e0ffe0|EOR #
| bgcolor=#e0e0e0|LSR A
| ASR #
| bgcolor=#e0ffff|JMP ''abs''
| bgcolor=#e0ffff|EOR ''abs''
| bgcolor=#e0ffff|LSR ''abs''
| SRE ''abs''
|-
! 5
| bgcolor=#ffffe0|BVC ''rel''
| NOP ''zpg'',X
| bgcolor=#e0e0e0|CLI
| NOP ''abs'',X
| bgcolor=#ffe0ff|EOR (''ind''),Y
| bgcolor=#ffe0e0|EOR ''zpg'',X
| bgcolor=#e0ffff|EOR ''abs'',Y
| bgcolor=#e0ffff|EOR ''abs'',X
| JAM
| SRE (''ind''),Y
| NOP ''zpg'',X
| bgcolor=#ffe0e0|EOR ''zpg'',X
| bgcolor=#ffe0e0|LSR ''zpg'',X
| SRE ''zpg'',X
| bgcolor=#e0e0e0|CLI
| bgcolor=#e0ffff|EOR ''abs'',Y
| NOP
| SRE ''abs'',Y
| NOP ''abs'',X
| bgcolor=#e0ffff|EOR ''abs'',X
| bgcolor=#e0ffff|LSR ''abs'',X
| SRE (''ind''),Y
| SRE ''zpg'',X
| SRE ''abs'',Y
| SRE ''abs'',X
|-
! 6
| bgcolor=#e0e0e0|RTS
| NOP ''zpg''
| bgcolor=#e0e0e0|PLA
| bgcolor=#ffe0ff|JMP (''ind'')
| bgcolor=#ffe0ff|ADC (''ind'',X)
| bgcolor=#ffe0e0|ADC ''zpg''
| bgcolor=#e0ffe0|ADC #
| bgcolor=#e0ffff|ADC ''abs''
| JAM
| bgcolor=#ffe0e0|ROR ''zpg''
| bgcolor=#e0e0e0|ROR A
| bgcolor=#e0ffff|ROR ''abs''
| RRA (''ind'',X)
| NOP ''zpg''
| bgcolor=#ffe0e0|ADC ''zpg''
| bgcolor=#ffe0e0|ROR ''zpg''
| RRA ''zpg''
| bgcolor=#e0e0e0|PLA
| bgcolor=#e0ffe0|ADC #
| bgcolor=#e0e0e0|ROR A
| ARR #
| bgcolor=#ffe0ff|JMP (''ind'')
| bgcolor=#e0ffff|ADC ''abs''
| bgcolor=#e0ffff|ROR ''abs''
| RRA ''abs''
|-
! 7
| bgcolor=#ffffe0|BVS ''rel''
| NOP ''zpg'',X
| bgcolor=#e0e0e0|SEI
| NOP ''abs'',X
| bgcolor=#ffe0ff|ADC (''ind''),Y
| JAM
| RRA (''ind''),Y
| NOP ''zpg'',X
| bgcolor=#ffe0e0|ADC ''zpg'',X
| bgcolor=#ffe0e0|ROR ''zpg'',X
| RRA ''zpg'',X
| bgcolor=#e0e0e0|SEI
| bgcolor=#e0ffff|ADC ''abs'',Y
| NOP
| RRA ''abs'',Y
| NOP ''abs'',X
| bgcolor=#e0ffff|ADC ''abs'',X
| JAM
| bgcolor=#ffe0e0|ROR ''zpg'',X
| NOP
| bgcolor=#e0ffff|ROR ''abs'',X
| RRA (''ind''),Y
| RRA ''zpg'',X
| RRA ''abs'',Y
| RRA ''abs'',X
|-
! 8
| NOP #
| bgcolor=#ffe0e0|STY ''zpg''
| bgcolor=#e0e0e0|DEY
| bgcolor=#e0ffff|STY ''abs''
| bgcolor=#ffe0ff|STA (''ind'',X)
| bgcolor=#ffe0e0|STA ''zpg''
| NOP #
| bgcolor=#e0ffff|STA ''abs''
| SAX (''ind'',X)
| bgcolor=#ffe0e0|STY ''zpg''
| bgcolor=#ffe0e0|STA ''zpg''
| bgcolor=#ffe0e0|STX ''zpg''
| SAX ''zpg''
| bgcolor=#e0e0e0|DEY
| NOP #
| bgcolor=#e0e0e0|TXA
| '''XAA #'''
| bgcolor=#e0ffff|STY ''abs''
| bgcolor=#e0ffff|STA ''abs''
| bgcolor=#e0ffff|STX ''abs''
| SAX ''zpg''
| SAX ''abs''
| '''XAA #'''
| SAX ''abs''
|-
! 9
| bgcolor=#ffffe0|BCC ''rel''
| bgcolor=#ffe0ff|STA (''ind''),Y
| JAM
| '''SHA (''ind''),Y'''
| bgcolor=#ffe0e0|STY ''zpg'',X
| bgcolor=#ffe0e0|STA ''zpg'',X
| bgcolor=#ffe0e0|STX ''zpg'',Y
| SAX ''zpg'',Y
| bgcolor=#e0e0e0|TYA
| bgcolor=#e0ffff|STA ''abs'',Y
| bgcolor=#e0e0e0|TXS
| '''SHS ''abs'',Y'''
| '''SHY ''abs'',X'''
| bgcolor=#ffe0ff|STA (''ind''),Y
| bgcolor=#ffe0e0|STA ''zpg'',X
| bgcolor=#e0e0e0|TXS
| bgcolor=#e0ffff|STA ''abs'',X
| JAM
| bgcolor=#ffe0e0|STX ''zpg'',Y
| NOP
| '''SHX ''abs'',Y'''
| '''SHA (''ind''),Y'''
| SAX ''zpg'',Y
| '''SHS ''abs'',Y'''
| '''SHA ''abs'',Y'''
|-
! A
| bgcolor=#e0ffe0|LDY #
| bgcolor=#ffe0ff|LDA (''ind'',X)
| bgcolor=#e0ffe0|LDX #
| LAX (''ind'',X)
| bgcolor=#ffe0e0|LDY ''zpg''
| bgcolor=#ffe0e0|LDA ''zpg''
| bgcolor=#ffe0e0|LDX ''zpg''
| LAX ''zpg''
| bgcolor=#e0e0e0|TAY
| bgcolor=#e0ffe0|LDA #
| bgcolor=#e0e0e0|TAX
| '''LXA #'''
| bgcolor=#e0ffff|LDY ''abs''
| bgcolor=#ffe0ff|LDA (''ind'',X)
| bgcolor=#ffe0e0|LDA ''zpg''
| bgcolor=#e0ffe0|LDA #
| bgcolor=#e0ffff|LDA ''abs''
| bgcolor=#e0ffe0|LDX #
| bgcolor=#ffe0e0|LDX ''zpg''
| bgcolor=#e0e0e0|TAX
| bgcolor=#e0ffff|LDX ''abs''
| LAX (''ind'',X)
| LAX ''zpg''
| '''LXA #'''
| LAX ''abs''
|-
! B
| bgcolor=#ffffe0|BCS ''rel''
| bgcolor=#ffe0ff|LDA (''ind''),Y
| JAM
| LAX (''ind''),Y
| bgcolor=#ffe0e0|LDY ''zpg'',X
| bgcolor=#ffe0e0|LDA ''zpg'',X
| bgcolor=#ffe0e0|LDX ''zpg'',Y
| LAX ''zpg'',Y
| bgcolor=#e0e0e0|CLV
| bgcolor=#e0ffff|LDA ''abs'',Y
| bgcolor=#e0e0e0|TSX
| LAS ''abs'',Y
| bgcolor=#e0ffff|LDY ''abs'',X
| bgcolor=#ffe0ff|LDA (''ind''),Y
| bgcolor=#ffe0e0|LDA ''zpg'',X
| bgcolor=#e0ffff|LDA ''abs'',Y
| bgcolor=#e0ffff|LDA ''abs'',X
| bgcolor=#e0ffe0|LDX #
| bgcolor=#ffe0e0|LDX ''zpg'',Y
| NOP
| bgcolor=#e0ffff|LDX ''abs'',Y
| LAX (''ind''),Y
| LAX ''zpg'',Y
| LAX ''abs'',Y
| LAX ''abs'',X
|-
! C
| bgcolor=#e0ffe0e0e0e0|CPY #| bgcolor=#ffe0ff|CMP (''ind'',X)| NOP #| DCP (''ind'',X)
| bgcolor=#ffe0e0|CPY ''zpg''
| bgcolor=#ffe0e0|CMP ''zpg''
| bgcolor=#ffe0e0|DEC ''zpg''
| DCP ''zpg''
| bgcolor=#e0e0e0|INY
| bgcolor=#e0ffe0|CMP #
| bgcolor=#e0e0e0|DEX
| SBX #
| bgcolor=#e0ffff|CPY ''abs''
| bgcolor=#ffe0ff|CMP (''ind'',X)
| bgcolor=#ffe0e0|CMP ''zpg''
| bgcolor=#e0ffe0|CMP #
| bgcolor=#e0ffff|CMP ''abs''
| JAM
| bgcolor=#ffe0e0|DEC ''zpg''
| bgcolor=#e0e0e0|DEX
| bgcolor=#e0ffff|DEC ''abs''
| DCP (''ind'',X)
| DCP ''zpg''
| '''SBX #'''
| DCP ''abs''
|-
! D
| bgcolor=#ffffe0|BNE ''rel''
| bgcolor=#ffe0ff|CMP (''ind''),Y
| JAM
| DCP (''ind''),Y
| NOP ''zpg'',X
| bgcolor=#ffe0e0|CMP ''zpg'',X
| bgcolor=#ffe0e0|DEC ''zpg'',X
| DCP ''zpg'',X
| bgcolor=#e0e0e0|CLD
| bgcolor=#e0ffff|CMP ''abs'',Y
| NOP
| DCP ''abs'',Y
| NOP ''abs'',X
| bgcolor=#ffe0ff|CMP (''ind''),Y
| bgcolor=#ffe0e0|CMP ''zpg'',X
| bgcolor=#e0ffff|CMP ''abs'',Y
| bgcolor=#e0ffff|CMP ''abs'',X
| JAM
| bgcolor=#ffe0e0|DEC ''zpg'',X
| NOP
| bgcolor=#e0ffff|DEC ''abs'',X
| DCP (''ind''),Y
| DCP ''zpg'',X
| DCP ''abs'',Y
| DCP ''abs'',X
|-
! E
| bgcolor=#e0ffe0e0e0e0|CPX #| bgcolor=#ffe0ff|SBC (''ind'',X)| NOP #| ISC (''ind'',X)
| bgcolor=#ffe0e0|CPX ''zpg''
| bgcolor=#ffe0e0|SBC ''zpg''
| bgcolor=#ffe0e0|INC ''zpg''
| ISC ''zpg''
| bgcolor=#e0e0e0|INX
| bgcolor=#e0ffe0|SBC #
| bgcolor=#e0e0e0|NOP
| SBC #
| bgcolor=#e0ffff|CPX ''abs''
| bgcolor=#ffe0ff|SBC (''ind'',X)
| bgcolor=#ffe0e0|SBC ''zpg''
| bgcolor=#e0ffe0|SBC #
| bgcolor=#e0ffff|SBC ''abs''
| JAM
| bgcolor=#ffe0e0|INC ''zpg''
| bgcolor=#e0e0e0|NOP
| bgcolor=#e0ffff|INC ''abs''
| ISC (''ind'',X)
| ISC ''zpg''
| '''SBC #'''
| ISC ''abs''
|-
! F
| bgcolor=#ffffe0|BEQ ''rel''
| bgcolor=#ffe0ff|SBC (''ind''),Y
| JAM
| ISC (''ind''),Y
| NOP ''zpg'',X
| bgcolor=#ffe0e0|SBC ''zpg'',X
| bgcolor=#ffe0e0|INC ''zpg'',X
| ISC ''zpg'',X
| bgcolor=#e0e0e0|SED
| bgcolor=#e0ffff|SBC ''abs'',Y
| NOP
| ISC ''abs'',Y
| NOP ''abs'',X
| bgcolor=#ffe0ff|SBC (''ind''),Y
| bgcolor=#ffe0e0|SBC ''zpg'',X
| bgcolor=#e0ffff|SBC ''abs'',Y
| bgcolor=#e0ffff|SBC ''abs'',X
| JAM
| bgcolor=#ffe0e0|INC ''zpg'',X
| NOP
| bgcolor=#e0ffff|INC ''abs'',X
| ISC (''ind''),Y
| ISC ''zpg'',X
| ISC ''abs'',Y
| ISC ''abs'',X
|-
8,324
edits