Ask your own question, for FREE!
Engineering 16 Online
OpenStudy (anonymous):

explain stack oprations LXI SP , PUSH , POP, SPHL, XTHL with the help of examples

OpenStudy (koikkara):

MICROPROCESSORS AND MICROCONTROLLERS (8085 Instructions) Hai Sweet Friend, @waliya WeLcoMe to OpeN stuDy.. !! > Load register pair immediate (LXI Reg. pair,) 16-bit data The instruction loads 16-bit data in the register pair designated in the operand. Example: LXI H, 2034 >Push register pair onto stack (PUSH Reg. pair ) The contents of the register pair designated in the operand are copied onto the stack in the following sequence. The stack pointer register is decremented and the contents of the high order register (B, D, H, A) are copied into that location. The stack pointer register is decremented again and the contents of low-order register (C, E, L, flags) are copied to that location. Example: PUSH B or PUSH A > Pop off stack to register pair (POP Reg. pair ) The contents of the memory location pointed out by the stack pointer register are copied to the low-order register (C, E, L, status flags) of the operand. The stack pointer is incremented by 1 and the contents of that memory location are copied to the high-order register (B, D, H, A) of the operand. The stack pointer register is again incremented by 1. Example: POP H or POP A > Copy H and L registers to the stack pointer( SPHL none ) The instruction loads the contents of the H and L registers into the stack pointer register, the contents of the H register provide the high-order address and the contents of the L register provide the low-order address. The contents of the H and L registers are not altered. Example: SPHL > Exchange H and L with top of stack ( XTHL none ) The contents of the L register are exchanged with the stack location pointed out by the contents of the stack pointer register. The contents of the H register are exchanged with the next stack location (SP+1); however, the contents of the stack pointer register are not altered. Example: XTHL Wondering If you are satisfied with this answer, Please close this Question. Thank You ! Keep in touch with Open Study.. Bye !

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!