Why in 8085, during LHLD
and SHLD
instructions L is used first while in BC
and DE
, B and D are used respectively?
Electronic – Why in HL pair, H is stored after L register
8085
8085
Why in 8085, during LHLD
and SHLD
instructions L is used first while in BC
and DE
, B and D are used respectively?
Best Answer
The 8085 has seven internal 8-bit registers for data, called A, B, C, D, E, H, and L. Six of these registers can also be used in pairs to hold 16-bit quantities. These pairs are BC, DE and HL, where B, D and H hold the MSB of the value and C, E and L hold the LSB, respectively.
When these register pairs are transferred to/from memory, the LSB is always stored in the lower address and the MSB in the upper. The
SHLD
andLHLD
instructions can be used to transfer the HL pair to/from an arbitrary address, while thePUSH
andPOP
instructions can transfer any of the three pairs to/from the stack.I hope this answers your question. I'm not sure what you mean when you say L is "used first".