org 00h
mov r0,#40h
mov a,@r0
mov r1,a
inc r0
mov a,@r0
mov b,a
inc r0
mov a,@r0 ; second number is in a
cjne r1,#00,n1
add a,b
jnc sk
mov b,#1
sk:mov b,#0h
sjmp las
n1:cjne r1,#01,n2
orl a,b
sjmp las
n2:cjne r1,#02,n3
xrl a,b
sjmp las
n3:mov a,#00h
mov b,#00h
las:mov 43h,a
mov 44h,b
sjmp $
end
Comments
Post a Comment