# Instructieset van de M6800

De M6800 van Motorola was in de jaren 70 waarschijnlijk de minst populaire 8-bits microprocessor. De Intel 8080 (en vooral de Z80) en de MOS 6502 werden veel meer toegepast.
De M6800 heeft slechts twee registers voor algemeen gebruik, accumulator A en accumulator B. Verder zijn er een 16-bits indexregister (IX), een stackpointer (SP) en een programmateller (PC). Ook het register met conditiecodes is aanwezig.
| linker vier bits: | 00 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | A0 | B0 | C0 | D0 | E0 | F0 |
| rechter vier bits | | | relatieve sprong | | acca | accb | ind | ext | imm | dir | ind | ext | imm | dir | ind | ext |
| 00 | | SBA A=A-B | BRA branch | TSX IX=SP+1 | NEG M=-M | NEG M=-M | NEG M=-M | NEG M=-M | SUB A=A-M | SUB A=A-M | SUB A=A-M | SUB A=A-M | SUB B=B-M | SUB B=B-M | SUB B=B-M | SUB B=B-M |
| 01 | NOP | CBA A:B | | INS SP=SP+1 | | | | | CMP A:M | CMP A:M | CMP A:M | CMP A:M | CMP B:M | CMP B:M | CMP B:M | CMP B:M |
| 02 | | | BHI if > | PUL pop A | | | | | SBC A=A-M-C | SBC A=A-M-C | SBC A=A-M-C | SBC A=A-M-C | SBC B=B-M-C | SBC B=B-M-C | SBC B=B-M-C | SBC B=B-M-C |
| 03 | | | BLS if <= | PUL pop B | COM M=~M | COM M=~M | COM M=~M | COM M=~M | | | | | | | | |
| 04 | | | BCC if C=0 | DES SP=SP-1 | LSR shift right | LSR shift right | LSR shift right | LSR shift right | AND A=A and M | AND A=A and M | AND A=A and M | AND A=A and M | AND B=B and M | AND B=B and M | AND B=B and M | AND B=B and M |
| 05 | | | BCS if C=1 | TXS SP=IX-1 | | | | | BIT A:M | BIT A:M | BIT A:M | BIT A:M | BIT B:M | BIT B:M | BIT B:M | BIT B:M |
| 06 | TAP CC=A | TAB B=A | BNE if <> | PSH push A | ROR rotate right | ROR rotate right | ROR rotate right | ROR rotate right | LDA A=M | LDA A=M | LDA A=M | LDA A=M | LDA B=M | LDA B=M | LDA B=M | LDA B=M |
| 07 | TPA A=CC | TBA A=B | BEQ if Z=1 | PSH push b | ASR shift right | ASR shift right | ASR shift right | ASR shift right | | STA M=A | STA M=A | STA M=A | | STA M=B | STA M=B | STA M=B |
| 08 | INX IX=IX+1 | | BVC if V=0 | | ASL shift left | ASL shift left | ASL shift left | ASL shift left | EOR A=A xor M | EOR A=A xor M | EOR A=A xor M | EOR A=A xor M | EOR B=B xor M | EOR B=B xor M | EOR B=B xor M | EOR B=B xor M |
| 09 | DEX IX=IX-1 | DAA | BVS if V=1 | RTS return | ROL rotate left | ROL rotate left | ROL rotate left | ROL rotate left | ADC A=A+M+c | ADC A=A+M+c | ADC A=A+M+c | ADC A=A+M+c | ADC B=B+M+c, | ADC B=B+M+c, | ADC B=B+M+c, | ADC B=B+M+c, |
| 0A | CLV V=0 | | BPL if >= | | DEC M=M-1 | DEC M=M-1 | DEC M=M-1 | DEC M=M-1 | ORA A=A or M | ORA A=A or M | ORA A=A or M | ORA A=A or M | ORA B=B or M | ORA B=B or M | ORA B=B or M | ORA B=B or M |
| 0B | SEV V=1 | ABA a=a+b | BMI if < | RTI ret from int | | | | | ADD A=A+M | ADD A=A+M | ADD A=A+M | ADD A=A+M | ADD B=B+M | ADD B=B+M | ADD B=B+M | ADD B=B+M |
| 0C | CLC C=0 | | BGE if >= | | INC M=M+1 | INC M=M+1 | INC M=M+1 | INC M=M+1 | CPX IX:M | CPX IX:M | CPX IX:M | CPX IX:M | | | | |
| 0D | SEC C=1 | | BLT if < | | TST M:0 | TST M:0 | TST M:0 | TST M:0 | BSR call | | JSR call | JSR call | | | | |
| 0E | CLI I=0 | | BGT if > | WAIT | | | JMP | JMP | LDS SP=M | LDS SP=M | LDS SP=M | LDS SP=M | LDX IX=M | LDX IX=M | LDX IX=M | LDX IX=M |
| 0F | SEI I=1 | | BLE if <= | SWI interrupt | CLR M=0 | CLR M=0 | CLR M=0 | CLR M=0 | | STS M=SP | STS M=SP | STS M=SP | | STX M=IX | STX M=IX | STX M=IX |