ORG 0
SJMP MAIN
ORG 3
LJMP ISR1
ORG 0BH
RETI
ORG 13H
LJMP ISR2
ORG 1BH
RETI
ORG 23H
RETI
ORG 2BH
RETI
ORG 30H
MAIN: MOV P3,#255
SETB EA
SETB EX0
SETB EX1
MOV P0,#0
GEN: MOV R2,#10
MOV P3,#255
CALL DELAY
SETB P0.0
SETB P0.1
CALL DELAY
CLR P0.0
CLR P0.1
SJMP GEN
ISR1: MOV P0,#0
CALL DELAY
MOV P0,#0
SETB P0.0
CALL DELAY
CLR P0.0
DJNZ R2, ISR1
RETI
ISR2: MOV P0,#0
CALL DELAY
MOV P0,#0
SETB P0.1
CALL DELAY
CLR P0.1
DJNZ R2, ISR2
RETI
DELAY:
MOV R3,#5
LP3: MOV R4,#100
LP2: MOV R5,#255
LP1: DJNZ R5, LP1
DJNZ R4, LP2
DJNZ R3, LP3
RET
END