- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Program counter (PC) in 8085 Microprocessor
PC is a 16-bit register. It contains a memory address. PC contains that very memory address from where the next instruction is to be fetched for execution. Suppose the PC contents are 8000H, then it means that the 8085 Desires to fetch the instruction Byte at 8000H. After fetching the Byte at 8000H, the PC is automatically incremented by 1. This way 8085 becomes ready to fetch the next Byte of the instruction (in case instruction fetch is incomplete), or fetch the next opcode (in case instruction fetch is over).
So in this 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 |
- Related Articles
- Program for decimal down counter in 8085 Microprocessor
- Program to simulate decimal down counter in 8085 Microprocessor
- Simulate decimal up counter in 8085 Microprocessor
- 8085 program for hexadecimal counter
- 8085 Program to simulate decimal up counter
- 8085 Program to simulate decimal down counter
- Program to compute LCM in 8085 Microprocessor
- Program for simulating a stopwatch in 8085 Microprocessor
- Program to perform linear search in 8085 Microprocessor
- Program to check for palindrome in 8085 Microprocessor
- Addressing modes of 8085 in 8085 Microprocessor
- Program to convert ASCII to binary in 8085 Microprocessor
- Executing the program and checking result in 8085 Microprocessor
- Program to convert BCD to HEX in 8085 Microprocessor
- Program to convert HEX to BCD in 8085 Microprocessor
