An instruction set covers a number of aspects such as instructions, addressing modes, interrupts, exceptions, registers, etc. This instruction set plays a major role in the programming of a system. And this programming decides the working behaviour of various I/O ports. Talking about the instructions, they are of following types.
- Data handling and memory operation instructions:
- Move data – This is used to move data to memory from registers and vice versa.
- Read/write data – This is used to read/write data on memory, registers and I/O ports.
- Set – A fix value on registers.
- Arithmetic and logical instructions:
- Add, subtract, multiply and divide.
- AND, OR, EXOR, NOT and SHIFT operations.
- Compare operation.
- Control flow operation:
- Branch operation
- Conditionally branch operation
- Indirectly branch operation
We can basically divide instruction set into following two versions: