![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/218545807356183.p
org 00h
main:
mov p1,#00h
mov r1,#00h
a1:call dis
jb p3.2, j1
jb p3.3,j2
jb p3.4,j3
jmp a1
dis:
mov a,r1
mov b,#10
div ab
mov p1,a
setb p2.0
call yanshi
mov p1,b
clr p2.0
call yanshi
ret
ji:call yanshi
jnb p3.2,a1
inc r1
ret
j2:call yanshi
jnb p3.3,a1
inc r1
inc r1
ret
j3:call yanshi
jnb p3.4,a1
subb r1 ,#01h
ret
ret
end