       ORG 0000H
       LJMP MAIN
       ORG 0030H
MAIN:
       MOV P1,#0FFH
       JB P2.0,LOOP1
       CLR P1.0
LOOP1:
       JB P2.1,LOOP2
       CLR P1.1
LOOP2:
       LCALL DELAY
       LJMP MAIN
DELAY:
       MOV R5,#255
LOOP3:
       MOV R6,#255
       DJNZ R6,$
       DJNZ R5,LOOP3
       RET
       END