beautypg.com

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

Page 149

background image

RPBASIC-52 PROGRAMMING GUIDE

A-5

3030 oc = str(10,$(2),0,oc)

rem Force letter A to first spot. This is a space as set by format above

3040 asc($(2),1) = 65

rem output string as it is

3050 goto 1510

rem Command D
rem Send string to display
rem Command format: >xxDCheck station 2??

rem NOTE: Position is set by another command (exercise left to
rem

the student)

rem Extract the string to display

3500 oc = str(0,$(1)) : rem get length
3510 oc = str(7,$(4),$(1),5,oc-6)

3520 display $(4)

3530 goto 1700

rem Set power up acknowledge flag (OFLAG)

4000 oflag = 1
4010 goto 1700

rem Command F
rem General status of card
rem Syntax: >xxF??
rem Returns An
rem Where n = code or codes of system. 0 = all ok
rem variable STATUS is global and indicates system status

4500 oc = str(10,$(2),0,status)

rem Force letter A to first spot. This is a space as set by format above

4510 asc($(2),1) = 65

rem optionally clear STATUS flag

4520 status = 0

rem output string as it is

4530 goto 1510

rem Emergency or safety shut down
rem Set lines as appropriate here
rem Do not return an acknowledge as message applies to all
rem cards on network

5000 rem shut down code here

5200 return