MCS6500
Microcomputer Family
Programming Manual
APPENDIX B INSTRUCTION LIST ALPHABETIC BY MNEMONIC WITH OP CODES, EXECUTION CYCLES AND MEMORY REQUIREMENTS The following notation applies to this summary: A Accumulator X, Y Index Registers M Memory P Processor Status Register S Stack Pointer ✓ Change _ No Change + Add ∧ Logical AND - Subtract∨Logical Exclusive Or ↑ Transfer from Stack ↓ Transfer to Stack → Transfer to ← Transfer to ∨ Logical OR PC Program Counter PCH Program Counter High PCL Program Counter Low OPER OPERAND # IMMEDIATE ADDRESSING MODE Note: At the top of each table is located in parentheses a reference number (Ref: XX) which directs the user to that Section in the MCS6500 Microcomputer Family Programming Manual in which the instruction is defined and discussed. ADC Add memory to accumulator with carry Operation: A + M + C → A, C N Z C I D V ✓ ✓ ✓ - - ✓ (Ref: 2.2.1)
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, X Absolute Absolute, X Absolute, Y (Indirect, X) (Indirect), Y |
ADC # Oper ADC Oper ADC Oper, X ADC Oper ADC Oper, X ADC Oper, Y ADC (Oper, X) ADC (Oper), Y |
69 65 75 6D 7D 79 61 71 |
2 2 2 3 3 3 2 2 |
2 3 4 4 4* 4* 6 5* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, X Absolute Absolute, X Absolute, Y (Indirect, X) (Indirect), Y |
AND # Oper AND Oper AND Oper, X AND Oper AND Oper, X AND Oper, Y AND (Oper, X) AND (Oper), Y |
29 25 35 2D 3D 39 21 31 |
2 2 2 3 3 3 2 2 |
2 3 4 4 4* 4* 6 5* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Accumulator Zero Page Zero Page, X Absolute Absolute, X |
ASL A ASL Oper ASL Oper, X ASL Oper ASL Oper, X |
0A 06 16 0E 1E |
1 2 2 3 3 |
2 5 6 6 7 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Relative | BCC Oper | 90 | 2 | 2* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Relative | BCS Oper | B0 | 2 | 2* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Relative | BEQ Oper | F0 | 2 | 2* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Zero Page | BIT Oper | 24 | 2 | 3 |
Absolute | BIT Oper | 2C | 3 | 4 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Relative | BMI Oper | 30 | 2 | 2* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Relative | BNE Oper | D0 | 2 | 2* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Relative | BPL Oper | 10 | 2 | 2* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | BRK | 00 | 1 | 7* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Relative | BVC Oper | 50 | 2 | 2* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Relative | BVS Oper | 70 | 2 | 2* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | CLC | 18 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | CLD | D8 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | CLI | 58 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | CLV | B8 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, X Absolute Absolute, X Absolute, Y (Indirect, X) (Indirect), Y |
CMP # Oper CMP Oper CMP Oper, X CMP Oper CMP Oper, X CMP Oper, Y CMP (Oper, X) CMP (Oper), Y |
C9 C5 D5 CD DD D9 C1 D1 |
2 2 2 3 3 3 2 2 |
2 3 4 4 4* 4* 6 5* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Absolute |
CPX # Oper CPX Oper CPX Oper |
E0 E4 EC |
2 2 3 |
2 3 4 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Absolute |
CPY # Oper CPY Oper CPY Oper |
C0 C4 CC |
2 2 3 |
2 3 4 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Zero Page Zero Page, X Absolute Absolute, X |
DEC # Oper DEC Oper DEC Oper, X DEC Oper |
C6 D6 CE DE |
2 2 3 3 |
5 6 6 7 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | DEX | CA | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | DEY | 88 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, X Absolute Absolute, X Absolute, Y (Indirect, X) (Indirect), Y |
EOR # Oper EOR Oper EOR Oper, X EOR Oper EOR Oper, X EOR Oper, Y EOR (Oper, X) EOR (Oper), Y |
49 45 55 4D 5D 59 41 51 |
2 2 2 3 3 3 2 2 |
2 3 4 4 4* 4* 6 5* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Zero Page Zero Page, X Absolute Absolute, X |
INC # Oper INC Oper INC Oper, X INC Oper |
E6 F6 EE FE |
2 2 3 3 |
5 6 6 7 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | INX | E8 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | INY | C8 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Absolute Indirect |
JMP Oper JMP (Oper) |
4C 6C |
3 3 |
3 5 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Absolute Indirect |
JMP Oper JMP (Oper) |
4C 6C |
3 3 |
3 5 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, X Absolute Absolute, X Absolute, Y (Indirect, X) (Indirect), Y |
LDA # Oper LDA Oper LDA Oper, X LDA Oper LDA Oper, X LDA Oper, Y LDA (Oper, X) LDA (Oper), Y |
A9 A5 B5 AD BD B9 A1 B1 |
2 2 2 3 3 3 2 2 |
2 3 4 4 4* 4* 6 5* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, Y Absolute Absolute, Y |
LDX # Oper LDX Oper LDX Oper, Y LDX Oper LDX Oper, Y |
A2 A6 B6 AE BE |
2 2 2 3 3 |
2 3 4 4 4* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, X Absolute Absolute, X |
LDY # Oper LDY Oper LDY Oper, X LDY Oper LDY Oper, X |
A0 A4 B4 AC BC |
2 2 2 3 3 |
2 3 4 4 4* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Accumulator Zero Page Zero Page, X Absolute Absolute, X |
LSR A LSR Oper LSR Oper, X LSR Oper LSR Oper, X |
4A 46 56 4E 5E |
1 2 2 3 3 |
2 5 6 6 7 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | NOP | EA | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, X Absolute Absolute, X Absolute, Y (Indirect, X) (Indirect), Y |
ORA # Oper ORA Oper ORA Oper, X ORA Oper ORA Oper, X ORA Oper, Y ORA (Oper, X) ORA (Oper), Y |
09 05 15 0D 1D 19 01 11 |
2 2 2 3 3 3 2 2 |
2 3 4 4 4* 4* 6 5 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | PHA | 48 | 1 | 3 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | PHP | 08 | 1 | 3 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | PLA | 68 | 1 | 3 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | PLP | 28 | 1 | 4 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Accumulator Zero Page Zero Page, X Absolute Absolute, X |
ROL A ROL Oper ROL Oper, X ROL Oper ROL Oper, X |
2A 26 36 2E 3E |
1 2 2 3 3 |
2 5 6 6 7 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Accumulator Zero Page Zero Page, X Absolute Absolute, X |
ROR A ROR Oper ROR Oper, X ROR Oper ROR Oper, X |
6A 66 76 6E 7E |
1 2 2 3 3 |
2 5 6 6 7 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | RTI | 40 | 1 | 6 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | RTS | 60 | 1 | 6 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Immediate Zero Page Zero Page, X Absolute Absolute, X Absolute, Y (Indirect, X) (Indirect), Y |
SBC # Oper SBC Oper SBC Oper, X SBC Oper SBC Oper, X SBC Oper, Y SBC (Oper, X) SBC (Oper), Y |
E9 E5 F5 ED FD F9 E1 F1 |
2 2 2 3 3 3 2 2 |
2 3 4 4 4* 4* 6 5* |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | SEC | 38 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | SED | F8 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | SEI/td> | 78 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Zero Page Zero Page, X Absolute Absolute, X Absolute, Y (Indirect, X) (Indirect), Y |
STA Oper STA Oper, X STA Oper STA Oper, X STA Oper, Y STA (Oper, X) STA (Oper), Y |
85 95 8D 9D 99 81 91 |
2 2 3 3 3 2 2 |
3 4 4 5 5 6 6 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Zero Page Zero Page, Y Absolute |
STX Oper STX Oper, Y STX Oper |
86 96 8E |
2 2 3 |
3 4 4 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Zero Page Zero Page, X Absolute |
STY Oper STY Oper, Y STY Oper |
84 94 8C |
2 2 3 |
3 4 4 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | TAX | AA | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | TAY | A8 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | TYA | 98 | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | TSX | BA | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | TXA | 8A | 1 | 2 |
Addressing Mode | Assembly Language Form | OP CODE | No. Bytes | No. Cycles |
---|---|---|---|---|
Implied | TXS | 9A | 1 | 2 |