Ok, to recap and hopefully stop pestering you guys this is what I assume is correct:


Loop:
SERIN portx,N2400,[“Chip1”],Var,

Monitor the serial port "X - TBA" until we see chip1, if found transfere the
following character into the var.

if Var= "A" Gosub turnonroutine_A
If the character after "Chip1" is "A" then goto the subroutine for A

if Var= "B" Gosub turnonroutine_B
If the character after "Chip1" is "B" then goto the subroutine for B


Var="0"
clear the var so it cannot have any further effect
goto Loop




turnonroutine_A:
Var="0"
clear the var so it cannot have any further effect

Port1=1 'turn on
pause 500 ' 1/2 second pause
Port1=0 'turn off
pause 500 ' 1/2 second pause
return



turnonroutine_B:
Var="0"
clear the var so it cannot have any further effect

Port2=1 'turn on
pause 500 ' 1/2 second pause
Port2=0 'turn off
pause 500 ' 1/2 second pause
return






One more thing confuses me with this:

SERIN portx,N2400,[“Chip1”],Var,

Will Var always only be one character in length?

So if my string sent was say chip1AZ would var just have the A and ignore the Z