Instruction set of 6800

Microprocessor8085

In this section, we will see the different types of instructions of Motorola M6800 microprocessor. There are 72 different types of instructions and 197 different opcodes. So there are 51 1-Byte instruction, 103 2-Byte instruction and 43 3-Byte instruction.

As we know that the Intel 8085 has 246 opcodes, though 6800 is more powerful than 8085. The Z-80 has 700 instructions but M6800 has some more advanced branching instructions.

The different instruction groups are like these −

  • Data Transfer Group

  • Arithmetic Group

  • Logical Group

  • Branch Group

  • Miscellaneous Instructions

Data transfer Group

In this group, there are 14 instructions. We can find 38 opcodes for these 14 instructions. These instructions are like below.

Mnemonics
Number of Opcodes
LDA A/B,  d8/a16/a8/IX+a8
8
STA A/B,  a16/a8/IX+a8
6
LDS/LDX, d16/a16/a8/IX+a8
8
STS/STX a16/a8/IX+a8
6
PSH/PUL A/B
4
TAB/TBA/TSX/TXS/TAP/TPA
6


Arithmetic Group

In this group, there are 15 instructions. We can find 55 opcodes for these 15 instructions. These instructions are like below.

Mnemonics
Number of opcodes
ABA/SBA
2
SBC/SUB/ADC/ADD A/B d8/a8/a16/IX+ a8
32
INS/INX/DES/DEX
4
NEG/CLR/INC/DEC A/B/a16/IX + a8
16
DAA
1

Logical Group

In this group, there are 14 instructions. We can find 73 opcodes for these 14 instructions. These instructions are as below.

Mnemonics
Number of Opcodes
BIT/CMP/EOR/ORA/AND A/B, d8/a8/a16/IX + a8
40
ROR/ROL/LSR/ASR/ASL/COM/TSTA/B/a16/IX + a8
28
CPX d16/a8/a16/IX + a8
4
CBA
1


Here rotate instructions(ROR and ROL) are only for 8-bit data. Like 8085, there is no rotate instruction through carrying.

The ASR and ASL are the arithmetic shift operations and LSR is Logical Shift Right instruction.

Branch Group

In this group, there are 21 instructions. We can find 23 opcodes for these 21 instructions. In Zilog Z-80, we have seen that their was Jump instruction for all frags except V. Here the instruction for V flag is also present.

These V related instructions are BVS (Branch when V flag is set), and BVC (Branch when V flag is reset)

In 6800, the conditional branch instructions can check more than one flags. It helps to compare two signed/unsigned numbers. Here higher and lower keywords are used for unsigned numbers and greater and fewer keywords are used for signed numbers. So for these keywords, there are instructions like BHI(Branch if Higher), BLS(Branch if lower or same). The BGT(Branch if greater than) and BGE(Branch if greater and equal), BLT(Branch if Less than) and BLE(Branch if less than)

These instructions are like below.

Mnemonics
Number of Opcodes
BCC/BCS/BEQ/BNE/BMI/BPL/BVC/BVSr8
8
BHI/BLS r8
2
BGT/BGE/BLT/BLE r8
4
BRA/BSR r8
2
JMP/JSR a16/IX + a8
4
RTS/RTI
2
SWI
1


Miscellaneous Group

Now we will see some special instructions, which are not classified into some special groups. There are eight opcodes of eight different types. These instructions are like WAI(Wait for interrupt), NOP etc.

These instructions are like below.

Mnemonics
Number of Opcodes
WAI
1
NOP
1
CLC/SEC/CLI/SEI/CLV/SEV
6

The WAI instruction is functionally same as the HLT instruction of 8085.

raja
Updated on 27-Jun-2020 13:32:04

Advertisements