ORG 0000H
START:SETB P3.4
      SETB P3.5
	  MOV  A,P3
	  ANL A,#30H
	  CJNE A,#00H,NEXT1
	  MOV P1,#80H
	  LCALL DELAY
	  MOV P1,#40H
	  LCALL DELAY
	  MOV P1,#20H
	  LCALL DELAY
	  MOV P1,#10H
	  LCALL DELAY
	  MOV P1,#08H
	  LCALL DELAY
	  MOV P1,#04H
	  LCALL DELAY
MOV P1,#02H
	  LCALL DELAY
	  MOV P1,#01H
	  LCALL DELAY
	  LJMP START
NEXT1:CJNE A,#10H,NEXT2
     MOV P1,#81H
	 LCALL DELAY
	 MOV P1,#42H
	 LCALL DELAY
	 MOV P1,#24H
	 LCALL DELAY
	 MOV P1,#18H
	 LCALL DELAY
	 LJMP START
NEXT2:CJNE A,#20H,NEXT3
      MOV P1,#0F0H
	  LCALL DELAY
	  MOV P1,#0FH
	  LCALL DELAY
	  LJMP START
NEXT3:MOV P1,#0FFH
      LCALL DELAY
	  MOV P1,#00H
	  LCALL DELAY
	  LJMP START
	  DELAY:MOV R1,#10
	  DEL1:MOV R2,#200
	  DEL2:MOV R3,#126
	  DEL3:DJNZ R3,DEL3
	       DJNZ R2,DEL2
		   DJNZ R1,DEL1
		   RET
		   END
