Perseus 'perseus Logic Prob RCSTA=0 output 8 output 10 output 5 low 5 dim dat,tcount,level CMCON0 = 4 level = 0 mainloop: tcount = 0 if level > 0 then high 8 endif loop: if PIR1 & 24 > 0 then gosub gotchange PIR1 = 0 goto mainloop endif tcount = tcount + 1 if tcount > level then low 8 endif if tcount > 20 then tcount = 0 goto mainloop endif goto loop gotchange: gosub blink dat = CMCON0 & 192 / 64 branch dat,none,tlow,thigh return none: level = 0 return tlow: level = 1 return thigh: level = 30 return blink: high 8 signal 10,10,25 low 8 pause 25 high 8 return