单片机问题:能帮我详细的解答一下这道题是怎么做出来的?
已知程序执行前有(A) = 02H,(SP) = 52H,(51H) = FFH,(52H) =...
已知程序执行前有(A) = 02H,(SP) = 52H,(51H) = FFH,(52H) = FFH。下述程序执行后,(A) = ,(SP) = ,(51H) = ,(52H) = ,(PC) = 。
POP DPH
POP DPL
MOV DPTR,#4000H
RL A
MOV B,A
MOVC A,@A+DPTR
PUSH Acc
MOV A,B
INC A
MOVC A,@A+DPTR
PUSH Acc
RET
ORG 4000H
DB 10H,80H,30H,50H,30H,50H
答:(A)=50H,(SP)=50H,(51H)=30H,(52H)=50H,(PC)=5030H。 展开
POP DPH
POP DPL
MOV DPTR,#4000H
RL A
MOV B,A
MOVC A,@A+DPTR
PUSH Acc
MOV A,B
INC A
MOVC A,@A+DPTR
PUSH Acc
RET
ORG 4000H
DB 10H,80H,30H,50H,30H,50H
答:(A)=50H,(SP)=50H,(51H)=30H,(52H)=50H,(PC)=5030H。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询