LED BIT P1.0
KEY BIT P1.1
ORG 0000H
LJMP MAIN
ORG 0030H
MAIN:
CLR 00H
MAIN1:
JB KEY,LOOP
JNB KEY,$
CPL 00H
LOOP:
JNB 00H,LOOP1
CPL LED
LCALL DELAY
SJMP MAIN1
LOOP1:
SETB LED
SJMP MAIN1
DELAY:
MOV R2,#200
DLY:
MOV R3,#250
DJNZ R3,$
DJNZ R2,DLY
RET
END