High or low state are identify by the length of the infrared signal.
stateH: mov r1,#100
acall highled
mov r1,#50
acall lowled ret stateL: mov r1,#50 acall highled mov r1,#50 acall lowled ret
ret