Instruction:
- An instruction is a binary pattern which is designed inside a microprocessor to perform a specific function.
- The entire group of instructions which determines what functions the microprocessor can perform is called the instruction set.
Types of instruction: There are 3 types of instructions:
- One byte instruction
- Two byte instruction
- Three byte instruction
One Byte Instruction: It includes the opcode and operand in the 8-bit only i.e. 1 byte only. For example: MOV A, B.
Two Byte Instruction: It uses the first byte to indicate the opcode and second byte to indicate the 8-bit operand. So it requires two successive memory locations. For example: MVI C, 51H.
Three Byte Instruction: It uses the first byte to indicate the opcode, second byte to indicate the lower order 8 bits of 16 bits data or address and third byte to indicate the higher order 8 bits of 16 bits data or address. For example: STA 3400H.
NOTE: The opcode is unique for each instruction and it contains the information about operations to be performed, register to be used, memory to be used, etc.
Comments
Post a Comment