Push pop using indirect addressing
Create a stack area at 1000h. Push 10h bytes, located at data memory addresses 60000h to 6000fh, on the stack using indirect addressing. Then pop the stack to memory addresses 62000h to 6200fh using indirect addressing. Load unique data into the 10h bytes in order to test the program.
© BrainMass Inc. brainmass.com February 24, 2021, 2:36 pm ad1c9bdddfhttps://brainmass.com/computer-science/memory-management/push-pop-using-indirect-addressing-31600
Solution Preview
Solution to Posting ID: 31600
/*Load Immediate Stack Ptr */
LXI SP,1000H
/*Load HL Direct - which is now memory (M = 60000) */
LHLD 60000H
MVI M,10H
MOV B,M
PUSH B
INR M /* M = 60001 */
MVI M,11H
MOV B,M
PUSH B
INR M
MVI M,12H
MOV B,M
PUSH B
INR M
MVI M,13H
MOV B,M
PUSH B
INR ...
Solution Summary
Create a stack area. Pop the stack to memory addresses using indirect addressing.
$2.19