Microcontroller Solutions
From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
46.ORG 0000H
MOV R7,#9
MOV P1,#0FFH
AGAIN1:MOV A,P1
ANL A,#0FH
ORL A,#30H
MOV R1,A
MOV R4,#34H
HERE:CJNE A,#30H,HERE1
SJMP BACK
HERE1:CJNE A,#31H,HERE2
SJMP BACK
HERE2:CJNE A,#32H,HERE3
SJMP BACK
HERE3:CJNE A,#33H,HERE4
SJMP BACK
HERE4:CJNE A,#34H,HERE5
SJMP BACK
HERE5:CJNE A,#35H,HERE6
SJMP BACK
HERE6:CJNE A,#36H,HERE7
SJMP BACK
HERE7:CJNE A,#37H,HERE8
SJMP BACK
HERE8:CJNE A,#38H,HERE9
SJMP BACK
HERE9:CJNE A,#39H,AGAIN1
BACK:
MOV P2,A