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 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 ;跳转到(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)( );(A)=10H ( );(B)=10H ( );(A)=20H MOV 23H,A;(23H)=20H ( );(A)=21H MOV 24H,A;(24H)=21H INC A ;(A)=22H ( );(25H)= 22H (2)MOV A,#50H;(A)=( )H MOV R0,A;(R0)=( )H MOV @R0,#30H;(50H)=( )H ADD A,@R0;(A)=( )H MOVX @R0,A;(50H)=( )H
- 下列哪条指令是正确的( )a) PUSH R2 b) ADD R0,Ac) MOVX A @DPTR d) MOV @R,A A: PUSH R2 B: ADD R0,A C: MOVX A @DPTR D: MOV @R,A
- 请说明下列指令属于哪一种寻址方式? MOV 23H,#30H () MOV 12H,A() MOV R0,#23H() MOV R7,12H() MOV R1,#12H() MOV A,@R0() MOV 34H,@R1() MOV 45H,34H() MOV DPTR,#6712H() MOV 12H,DPH() MOV R0,A() MOV A,@R0() A 立即寻址 B 直接寻址 C 间接寻址 D 寄存器寻址