ProSoft Technology MVI56-BAS User Manual
Page 208
BASIC-52 Implementation
MVI56-BAS ♦ ControlLogix Platform
User Manual
BASIC Module (DB/BAS Compatible)
Page 208 of 234
ProSoft Technology, Inc.
December 13, 2011
Operator /
Statement
Description
Example
PUSH
PUSH arguments onto the argument
stack.
PUSH A,B,ASC(N),SIN(2)
RAM
Selects the program in RAM memory.
It can be used after a ROM command
RAM
READ
REM
Specifies a comment line in a BASIC
program
REM
REN
Renumbers program lines REN (new
line, old line, increment)
REN 1000, 800, 100
RESTORE
Resets the internal DATA READ
pointer
RESTORE
RETI
Exits from an interrupt
RETI
RETURN
Returns control to the statement
following the most recently executed
GOSUB statement
10 GOSUB 100
20 PRINT "LINE 20"
25 GOTO 200
100 PRINT "LINE 100"
110 RETURN
200 END
ROM
Selects a program from ROM memory
(Compact Flash), based on a given
program location number
ROM 3
RROM
Selects and runs a program from
ROM memory (Compact Flash),
based on a given program location
number
RROM 3
RUN
Runs the currently selected program
RUN
SNGLSTP
Initiates a single step program
execution. Use this statement before
a RUN command
SNGLSTP
SPC()
ST_AT
Writes a floating-point number to
memory
PUSH A
ST_AT (B)
STOP
Breaks the program execution at
specific points. The CONT command
will resume program execution
10 FOR I = 1 TO 20
20 PRINT I
30 STOP
40 NEXT I
STRING
STRING allocates memory for BASIC
strings.
STRING 100,10
TIME
Retrieve or assign a value to the
internal free running clock
PRINT TIME
TIME = 0
USING
VER
Prints the current version of the
firmware
VER
XBY()
Accesses error information.
See Debugging a BASIC Program