org 0000h
ajmp main
org 0050h
main:mov sp,#32h
mov 30h,#50h
mov 31h,#5Fh
mov 32h,#3ch
POP DPH;
POP DPL;
POP SP;
nop
end
运行完以上程序后,我不理解为什么sp=50h,执行POP SP首先把(30H)=50H的内容给SP,然后因为是出栈所以要减一不是吗?为什么不是(SP)=4FH ?
org 0000h ajmp main org 0050h main:mov sp,#32h mov 30h,#50h mov 31h,#5Fh mov 32h,#3ch POP DPH; ;把32H里的内容放到DPH里 POP DPL; ;把31H里的内容放到DPL里 POP SP; ;把30H里的内容放到SP里,30H里的值是多少?不是50H吗? nop end