Instruction register (IR) in 8085 Microprocessor

MicroprocessorMicrocontroller8085

IR (Instruction Register) is a special purpose register, which is used to receive the 8-bit opcode portion of an instruction. It is not accessible to the programmer. What it means is that there are no instructions by which the programmer can load it with values of his choice. For example, instructions like ‘MOV IR, D’ or ‘MVI IR, 45H’ are not present in the instruction set of 8085. Thus, IR register is not shown in the programmer's view of 8085.

Let us consider one example. First of all, PC is loaded with the value 8000H. This is done by typing the ‘Go’ key, then typing “8000”, and finally typing the “Exec” key. Then the 8085 performs the following action. It sends out 8000H the address, which is the content of the PC. From location 8000H it receives 21H, the opcode for LXI H. It is received in an 8-bit register called instruction register (IR for short), as shown in the following figure.

Address
Hex Codes
Label
Mnemonic
T-States
Comment
8000
21 (IR)
50 (Z)
80 (W)
START:
LXI H, 8050H
10
Setup HL pair as a pointer for source memory.
8003
11 (IR)
70 (Z)
80 (W)

LXI D, 8070H
10
Set up DE pair as a pointer for destination memory
8006
76 (IR)

HLT
5
Stop

So in the above example, at first IR will get loaded by 21H i.e. LXI H instruction at address 8000H. then by 11H i.e. LXI D at address 8003H and at last by 76H i.e. HLT instruction at address 8006H. IR is having auto-increment feature which is very much useful in linear execution of instructions from the memory. On the other hand, when instruction LXI was getting executed then temporary registers W and Z were holding the 16-bit address 8050H, then 8070H as shown in the table.

raja
Published on 11-Mar-2019 10:37:23
Advertisements