Temporary (temp) register in 8085 Microprocessor


Temporary register is also an 8-bit register which the programmer can’t access at all. It is temporarily stored inside 8085 microprocessor which is 8 bit operand to the instruction set. For example, when the fetching of instructions “MVI M, 34H” is done the instruction register IR register will receive the opcode for MVI M, and the Temp register receives 34H.

The operations of arithmetic and logical sequence carried out involves two operands, among which one is operand is provided by the accumulator, and the other operand is provided by the Temp register. For example, in the addition process the instruction to the B register, all the contents are delivered moved to the Temp register and then ultimately the Arithmetic Logical Unit performs the addition of register A and Temp register. In similarity with the W and Z registers in 8085 microprocessors, it is also temporary registers also used for storing the information internally ranging of address range tending to 16 bits or 2 Bytes.

Advantage: Stores the information internally.

Disadvantage: Users rather programmers don’t have any access to it

To define Temporary Register, we can mention that it is an 8-bit non-programmable resister used to hold data during an arithmetic and logic operation (temporary resister is used to hold intermediate result). The result is stored in the accumulator, and the flags (flip-flops) are set or reset according to the result of the operation.

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.

Hex Codes
21 (IR)
50 (Z)
80 (W)
LXI H, 8050H
Setup HL pair as a pointer for source memory.
11 (IR)
70 (Z)
80 (W)

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


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.

Updated on 30-Jul-2019 22:30:25