- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
W and Z registers in 8085 Microprocessor
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.
W and Z are two 8-bit temporary registers of 8085 microprocessor, which is not accessible to the user. They are exclusively used for the internal operation by the microprocessor. These registers are used either to store 8-bit of information in each W and Z registers or a 16-bit data in W, Z register pair with lower order 8-bits in Z and higher-order 8-bits in W register.
Let us consider one example. First of all, the 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.
- Related Articles
- Registers of 8085 Microprocessor
- Registers B, C, D, E, H, and L in 8085 Microprocessor
- General purpose registers in 8086 microprocessor
- IN and OUT instructions in 8085 Microprocessor
- Addressing modes of 8085 in 8085 Microprocessor
- Timing and control unit in 8085 Microprocessor
- Microprocessor 8085 Architecture
- Differences between 8085 and 8086 microprocessor
- DAA instruction in 8085 Microprocessor
- ALE pin in 8085 Microprocessor
- Prompt mode in 8085 Microprocessor
- Command mode in 8085 Microprocessor
- Flags register in 8085 Microprocessor
- Decimal addition in 8085 Microprocessor
- BCD numbers in 8085 Microprocessor
