求教大神,4-8题怎么做
求教大神,4-8题 根据网上整理的答案,参考下。注释中的序号表示执行顺序。START: MOV AX,2000H
MOV SS,AX ;初始化堆栈段,SS=2000H
MOV SP,000FH ;SP=000FH
MOV AX,1000H ;AX=1000H
PUSH AX ;①AX入栈,SP=000DH
MOV BX,5439H ;BX=5439H
PUSH BX ;②BX入栈,SP=000BH
CALL SUBRT ;③近调用,IP入栈,SP=0009H
STOP0: HLT ;SP=0009H,AX=99A3H,
;BX=5439H,CF=0,SF=1,OF=1
SUBRT PROC NEAR ;执行到此指令,SP=0009H
PUSH BP ;④执行后,BP入栈,SP=0007H
MOV BP,SP ;BP=SP=0007H
VAAX: MOV AX, ;⑤BP+4=000BH,AX=5439H
ADD AX,456AH ;AX=99A3H,CF=0,SF=1,OF=1
MOV ,AX ;=99A3H
POP BP ;⑥执行后,SP=0009H
RET 4 ;⑦执行后,IP出栈,SP+2+4=000FH
SUBRT ENDP
页:
[1]