ProSoft Technology MVI56-BAS User Manual
Page 222

Reference
MVI56-BAS ♦ ControlLogix Platform
User Manual
BASIC Module (DB/BAS Compatible)
Page 222 of 234
ProSoft Technology, Inc.
December 13, 2011
BASIC Program Usage
BASIC-52 originally stored BASIC programs in two memory areas: battery
backed external RAM (XRAM), and EEPROM (ROM). In the MVI56-BAS BASIC,
two files on the Compact Flash emulate XRAM and EEPROM. These two files
are named "XRAM.BAS" and "EPROM.BAS". When a program is typed directly
into the module, the program is tokenized and stored in "XRAM.BAS". The
PROG command copies the XRAM program into "EPROM.BAS". The XFER
command copies one of the programs back from "EPROM.BAS" into
"XRAM.BAS". The following topics explain how the module uses the RAM and
ROM storage areas.
Using RAM Memory
To actually run a BASIC program, you must get the BASIC program into RAM.
There are three ways to get a program into RAM:
1 Type the program in a line at a time using an ASCII terminal.
2 Use the EXPORT and LOAD commands.
3 Use the XFER command.
Typing the Program
When typing the program in directly, type the program in a line at a time. If a
mistake is made in the middle of a line, either type the line over or use the EDIT
command. If an existing line must be replaced with a new one, type the line in
again. Lines can be inserted between two existing lines by typing in a line with a
line number between the lines. If the line numbers are consecutive integers, and
another line cannot be inserted, use the REN command. If a line must be
deleted, type the line number. Refer to Creating BASIC programs (page 47) for
more information.
Using the EXPORT and LOAD Commands
As stated above, "XRAM.BAS" is tokenized before it is saved, so the file is not
directly readable. One may want to save a version that is readable by the human
eye. After the program has been entered and debugged, a permanent readable
copy of the program can be saved to the Compact flash using the EXPORT
command. Then EXIT to DOS where the SY.EXE program can be used to upload
the program to a host computer.