ORG 0000H
START: MOV R0,#41H
MOV R2,#00H
MOV R3,#00H
LOOP: MOV A,@R0
INC R0
CJNE A,#-1,LOOP1
SJMP DONE
LOOP1: CJNE A,#64H,LOOP2
INC R2
MOV 51H,R2
SJMP LOOP
LOOP2: SUBB A,#3CH
LOOP3: JNC LOOP
INC R3
MOV 52H,R3
SJMP LOOP
DONE: SJMP DONE
END
执行:
在MEMORY中输入I:41H,回车,输几个100(64H)
在MEMORY中输入I:51H,回车,单步执行,即可统计
文章评论(0条评论)
登录后参与讨论