- 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
Instruction type SPHL in 8085 Microprocessor
In 8085 Instruction set, SPHL is an instruction with the help of which Stack Pointer will get initialized with the contents of register pair HL. It is an indirect way of initializing the stack pointer. But it is not a very common and regularly usable instruction as well. It occupies only 1-Byte in memory, compared to the other instruction LXI SP instruction, which is 3-Bytes long used for initializing SP on the other hand. Due to this advantage, SPHL can be useful when SP is required to get initialized to a specific value a number of times in a program.
Mnemonics, Operand | Opcode(in HEX) | Bytes |
---|---|---|
SPHL | F9 | 1 |
As an example, let us consider, that initial contents of HL and SP register pairs are AABBH and CCDDH. Then after execution of instruction SPHL, HL and SP both will become AABBH. The result of execution of this instruction has been depicted in the following tracing table −
Before | After | |
---|---|---|
(HL) |
AABBH | AABBH |
(SP) |
CCDDH | AABBH |
Address | Hex Codes | Mnemonic | Comment |
---|---|---|---|
2006 | F9 | SPHL | Initializing SP register with HL register pair content |
The timing diagram against this instruction SPHL execution is as follows −
Summary − So this instruction SPHL requires 1-Byte, 1-Machine Cycle (Opcode Fetch) and 6 T-States for execution as shown in the timing diagram.
To Continue Learning Please Login
Login with Google