ProSoft Technology MVI56-BAS User Manual
Page 118

BASIC CALLs Syntax
MVI56-BAS ♦ ControlLogix Platform
User Manual
BASIC Module (DB/BAS Compatible)
Page 118 of 234
ProSoft Technology, Inc.
December 13, 2011
CALL 57: Transfer BASIC Output Buffer to CLX using MSG
CALL 57 can be used to transfer up to 100 words from the BASIC module output
buffer to a CLX data file using a MSG instruction. This CALL can be used to
transfer word address 100 to 199 in the BASIC output buffer.
Syntax:
PUSH A
CALL 57
POP B
Where:
A = number of words to be transferred (up to 100)
B = call status (0= successful transfer CLX in Run, 1= successful transfer CLX in
Program, 2= successful transfer CLX in Test, 10=invalid length)
Example:
10 DIM A(100)
.
.
.
210 GOSUB 720
220 GOSUB 820
.
.
700 REM This routine copies data from variable A()
710 REM to the BASIC Output Buffer CLX MSG area
720 FOR I = 0 TO 99
730 PUSH A(I),I+100: CALL 25
740 NEXT I
750 RETURN
.
.
.
800 REM This routine copies the BASIC Output Buffer
810 REM CLX MSG Area to the CLX
820 PUSH 100: CALL 57: POP S
830 IF(S<>0) THEN PRINT "CLX not in RUN mode"
840 RETURN
.
.
.