ORG 0000 h
LJMP MAIN
ORG 0013 h
LJMP INT_EX1
ORG 0030 h
MAIN: CLR IT0; Trigger level, low level effective
SETB EX1. Allow the external interrupt 1
SETB EA. Insert the user program
WAIT: AJMP WAIT; Wait for interrupt
INT_EX1: JB P1.2, NEXT1; Judge IR3 interrupt
LJMP INT_IR3; Jump to IR3 interrupt handlers
NEXT1: JB P1.1, NEXT2; Judge IR2 interrupt
LJMP INT_IR2; Jump to IR2 interrupt handlers
NEXT2: LJMP INT_IR1; Jump to IR1 interrupt handlers
ORG 1000 h
INT_IR3: above handler
RETI; Interrupt return
ORG 1100 h
INT_IR2: above handler
RETI; Interrupt return
ORG 1200 h
INT_IR1: above handler
RETI; Interrupt return
