设R0=20H,R1=25H,(20H)=80H,(21H)=90H,(22H)=A0H,(25H)=A0H,(26H)=6FH,(27H)=76H,下列程序执行程序后,(20H)=_、(21H)=_、(22H)=_的值。
CLRC
MOVR2,#3
LOOP:MOVA,@R0
ADDCA,@R1
MOV@R0,A
INCR0
INCR1
DJNZR2,LOOP
JNCNEXT1
MOV@R0,#01H
SJMP$
NEXT:DECR0
SJMP$
CLRC
MOVR2,#3
LOOP:MOVA,@R0
ADDCA,@R1
MOV@R0,A
INCR0
INCR1
DJNZR2,LOOP
JNCNEXT1
MOV@R0,#01H
SJMP$
NEXT:DECR0
SJMP$
举一反三
- 设(R0)=20H,(R1)=30H,(20H)=20H,(21H)=30H,(22H)=40H,(30H)=E0H,(31H)=50H,(32H)=60H。 CLRC MOVR2,#3 LOOP:MOVA,@R0 ADDCA,@R1 MOV@R0,A INCR0 INCR1 DJNZR2,LOOP SJMP$ 程序执行后,(20H)=。 注意:答案用十六进制,十六进制数用大写字母H表示
- 根据下列程序段运行情况,将运行结果和指令分别补充完整。 (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
- 以下程序的输出结果是( )。 struct HAR { int x, y; struct HAR *p;} h[2]; main(){ h[0].x=1; h[0].y=2; h[1].x=3; h[1].y=4; h[0].p=&h[1]; h[1].p=h; printf("%d %d\n",(h[0].p)->x,(h[1].p)->y); }
- 无法输出字符串"her"的程序段是( ) A: char a[ ]={'h','e','r','\0'}; puts(a); B: char a[4]={'h','e',0,'r'}; puts(a); C: char a[ ]={'h','e','r',0}; puts(a); D: char a[4]={'h','e','r','0'-48}; puts(a);
- 执行如下三条指令后,20H单元的内容是() M O V R 0,#20H M O V 40H,#0 F H M O V ﹫R 0,40H