以下程序的执行是在RAM指定区间查找数据( )。START:MOV R0,#30H MOV R2,#21HLOOP:MOV A,@R0 CJNE A,#0AAH,NEXT MOV 51H,#01H AJMP EXITNEXT:INC R0 DJNZ R2,LOOP MOV 51H,#00HEXIT: SJMP $ END
A: 0AAH
B: 30H
C: 20H
D: 01H
A: 0AAH
B: 30H
C: 20H
D: 01H
举一反三
- 指令 MOV R0,20H 执行前 (R0)=30H, (20H)=38H,执行后(R0)=?
- 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)=
- 根据下列程序段运行情况,将运行结果和指令分别补充完整。 (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
- 假设(30H)=60H,(60H)=55H,则执行下列指令后,(A)=H,MOV R0,30HMOV A,@R0
- 已知(A)=01H,(SP)=50H,(DPTR)=100H。则下述程序段执行后 (A)、(B)、(SP)、(DPH)、Acc.7的结果为( )。 RL A MOV B,A MOVC A,@A+DPTR PUSH Acc SJMP $ ORG 100H DB 10H,20H,30H A: 30H,2,51H,01H,0 B: 20H,02H,4FH,10H,0 C: 30H,02H,51H,01H,1 D: 20H,4,50H,00H,1