Can anyone help me translate this?
relay var b3 'relay number storage variable
stat var b4 'relay status ON/OFF variable
baud con 16468 '9600,N,8,1
serpin con 0 'serial I/O pin = 0
loop:
serin serpin,baud,[wait(254),relay,stat] 'serial data in on pin0
if relay = 1 then outr1 ' if request is for relay#1 then goto relay#1 routine
if relay = 2 then outr2 ' if request is for relay#2 then goto relay#2 routine
if relay = 3 then outr3 ' if request is for relay#3 then goto relay#3 routine
if relay = 4 then outr4 ' if request is for relay#4 then goto relay#4 routine
goto loop
outr1:
if stat = 1 then high1 ' If status request is I/O pin#1 logic 1 [high]
low 1: goto loop ' then make I/O pin#1 high, else make it [low]
high1:
high 1: goto loop ' Make I/O pin#1 logic 1 [High]
outr2:
if stat = 1 then high2
low 2: goto loop
high2:
high 2: goto loop
outr3:
if stat = 1 then high3
low 3: goto loop
high3:
high 3: goto loop
outr4:
if stat = 1 then high4
low 4: goto loop
high4:
high 4: goto loop
relay var b3 'relay number storage variable
stat var b4 'relay status ON/OFF variable
baud con 16468 '9600,N,8,1
serpin con 0 'serial I/O pin = 0
loop:
serin serpin,baud,[wait(254),relay,stat] 'serial data in on pin0
if relay = 1 then outr1 ' if request is for relay#1 then goto relay#1 routine
if relay = 2 then outr2 ' if request is for relay#2 then goto relay#2 routine
if relay = 3 then outr3 ' if request is for relay#3 then goto relay#3 routine
if relay = 4 then outr4 ' if request is for relay#4 then goto relay#4 routine
goto loop
outr1:
if stat = 1 then high1 ' If status request is I/O pin#1 logic 1 [high]
low 1: goto loop ' then make I/O pin#1 high, else make it [low]
high1:
high 1: goto loop ' Make I/O pin#1 logic 1 [High]
outr2:
if stat = 1 then high2
low 2: goto loop
high2:
high 2: goto loop
outr3:
if stat = 1 then high3
low 3: goto loop
high3:
high 3: goto loop
outr4:
if stat = 1 then high4
low 4: goto loop
high4:
high 4: goto loop