Instruction type LXI SP, d16 in 8085 Microprocessor

In 8085 Instruction set, LXI SP, d16 instruction is a special case of LXI rp, d16. Using this instruction, we can load 16-bit immediate data/address on the Stack Pointer (SP). It occupies 3-Bytes in the memory.

Mnemonics, Operand Opcode(in HEX) Bytes
LXI SP 31 3

Let us consider a sample instruction LXI SP, 4050H as an example of this category. The result of execution of this instruction has been shown in the following tracing table −

Before After


Any value 4050H

Address Hex Codes Mnemonic Comment
2000 31 LXI SP, 4050H Initializing SP register with 16-bit data 4050H
2001 50 Low order Byte of the data
2002 40 High order Byte of the data

The timing diagram against this instruction LXI SP 4050H execution is as follows −


Summary − So this instruction LXI SP 4050H requires 1-Byte, 3-Machine Cycles (Opcode Fetch, Memory Read, Memory Read) and 10 T-States for execution as shown in the timing diagram.

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 30-Jul-2019

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started