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,執(zhí)行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