Lampiran -3 :
movc A,@A+DPTR
mov P0,A
clr P2.7
call delay
setb P2.7
call delay
MASUK: cjne A,#0FEH,KELUAR
cjne R2,#0AH,BACK
mov R2,#0
inc R1
cjne R1,#0AH,BACK
call UJI_KL
cjne R2,#0FFH,BACK
mov R2,#9
dec R1
cjne R1,#0FFH,BACK
mov R1,#0
DELAY2: djnz R6,DELAY2
djnz R7,DELAY1
ret
UJI_MS: cjne R2,#1H,BALIK
cjne R1,#0H,BALIK
clr P2.5
ret
KIPAS: clr P2.0
UJI_KL: cjne R2,#0H,BLK
cjne R1,#0H,BLK
setb P2.5
setb P2 .0
ret
BALIK: RET
BLK: RET
ANGKA: db 11000000b
db 11111001b
db 10100100b
db 10110000b
db 10011001b
db 10010010b
db 10000010b
db 11111000b
db 10000000b
db 10010000b