Rpbasic-52 programming guide – Remote Processing BASIC 52 User Manual
Page 157

RPBASIC-52 PROGRAMMING GUIDE
B-8
rem
cycle 4
rem Look for OK
rem If have OK, then reset cycle to 0
rem If message is not OK, simply leave
2500 $(1) = "OK"
2510 if str(8,$(0),$(1)) <> 1 then return
rem got OK
rem Signal system and let tick timer do next
2520 okflg = 1
2590 return
rem
cycle 5
rem send out sign on message after 1 second delay
rem Clear out COM if got here
2600 clear com(1)
2610 return
rem mcycl 0 processing from main loop
rem send back analog channel 0 to modem
10000 uo 1
10010 print ain(0)
10020 uo 0
10030 flag(0) = 0
10090 return
rem mcycl 1 processing
rem Send back digital status from line 0
11000 uo 1
11010 print line(0)
11020 uo 0
11030 flag(1) = 0
11090 return
rem mcycl 2 processing
rem hang up
12000 htim = 0
12010 cycle = 4
12020 flag(2) = 0
12030 uo1
12040 print:print "Hanging up"
12050 uo 0
12090 return