ORG 0 LJMP START ORG 30H START:MOV SP,#50HMOV R2,#10H MOV DPTR,#3000H CLR ALOOP: MOVX @DPTR,A INC DPTR DJNZ R2,LOOP INC DPH INC DPH MOV 20H,#36H SETB 00H MOV A,20H MOVX @DPTR,A INC A INC A PUSH ACC XCH A,R2 POP DPH ADD A,#55H PUSH ACC END(A)= (R2)= (20H)= (DPTR)= (SP)=
举一反三
- ORG 0 LJMP START ORG 30HSTART: MOV SP,#50H MOV DPTR,#3000H MOV R0,#20H MOV A,#23H MOV R2,#0FH SETB 01H SETB C ADDC A,@R0 INC R0 MOV @R0,A LOOP:DJNZ R2, LOOP SWAP A PUSH ACC INC DPH MOVX @DPTR,A POP B RR A ADD A,B MOV P1,A END(21H)= (R2)= (A)= (B)= (3100H)=
- ORG 0 LJMP START ;跳转到(PC)=0030H处 ORG 30H START:MOV R0,#30H MOV A,#12H SETB C ADDC A,R0 MOV @R0,A SWAP A INC A MOV DPTR,#2000H INC DPH MOV P1,A INC A MOVX @DPTR,A XCH A,R0 RL A ;累加器A内容循环左移 PUSH ACC RL A ;累加器A内容循环左移 POP ACC END(A)= (R0)= (DPTR)= (P1)= (30H)=
- 判断以下指令的正误。 (1) MOV R1,R2 (2)MOV 20H,@R3 (3)DEC DPTR (4)INC DPTR (5)MOVX A,@R1 (6)MOVC A,@DPTR (7)PUSH DPTR(8)CLR R1 (9)MOV 20H,30H (10)MOV F0,C (11) CPL R7 (12)RC A
- 已知程序执行前有(A)=02H,(SP)=42H,(41H)=FFH,(42H)=FFH。 POP DPH POP DPL MOV DPTR,#3000H RL A MOV B,A MOVC A,@A+DPTR PUSH Acc MOV A,B INC A MOVC A,@A+DPTR PUSH Acc RET ORG 3000H DB 10H,80H,30H,80H,50H,80H 程序执行后, (A)=;(SP)=;(41H)=;(42H)=;PC=
- 已知程序执行前有A = 02H,SP = 42H,(41H) = FFH,(42H) = FFH。下述程序执行后,(42H) =( )。 POP DPH POP DPL MOV DPTR,#3000H RL A MOV B,A MOVC A,@A+DPTR PUSH Acc MOV A,B INC A MOVC A,@A+DPTR PUSH Acc RET ORG 3000H DB 10H,80H,30H,80H,50H,80H