Remote Processing RPC-210 User Manual
Page 11

SETUP AND OPERATION
SECTION 2
Page 2-5
Downloading a program requires transmitting an ASCII
file. As you type in (or download) a line, RP BASIC-52
tokenizes that line . T he time to do this depends up on its
complexity and how many lines of code have been
entered.
RPBASIC-52 m ust finish compiling a line before starting
the next one. When a line is compiled, a "> " character
is sent. This should be your terminal progra ms pacing
c h ar a c te r w he n do w n lo a di ng a pr o g ra m .
If your communications program (such as
Hyper Ter minal) can not look for a pacing pr ompt, set it
t o d e la y tr a n sm i ss io n af te r e ac h li ne is se n t. A 1 0 0 m s
delay is usually adequate, but your program m ay be long
and complex and require more time. A result of a short
transmission time is missing or incomplete program
lines.
Editing programs and program ming hints
Files uploaded or downloaded are simply ASCII DOS
text files. No special characters or control codes are
used. You m ay create and edit programs using your
favorite word processor or editor. Just be sure to save
files in DO S text form at.
A technique used to further program documentation and
reduce code space is the use of comments in a
downloaded file. For example, you could have the
following in a file written on your editor:
REM Check position
REM Read output from the pot and
REM calculate the position
2200 a = ain(0) :REM Get position
The first 3 comments downloaded to the RPC -210
are ignored. Similarly, the empty lines between
comm ents are a lso ignored . L ine 2200, with its
comment, is a part of the program and could be listed.
The m ajor pena lty by wr iting a progr am this w ay is
increased download time.
Notice that you can w rite a progr am in lower case
characters. RPBASIC-52 translates them to upper case.
Some program mers put "N EW" as the first line in the
file. During debugging, it is common to insert
"temp orary" lines. Pu tting in “NE W” ensures that these
lines are gone. Dow nloading time is increased when the
old progr am is still pre sent. If you like to wr ite
programs in separate modules, you can download them
separately. M odules are assigned blocks of line
numbers. Start up code might be from 1 to 999.
Interrupt handling (keypad, serial ports) might be from
lines 1000 to 1499. Display output might be from 1500
to 2500. The programm er must determine the number
of lines required for each section.
RPBASIC-52 autom atically formats a line for minimum
code space. F or example, you could download the
following line of code:
10 fora=0to5
When you listed this line, it would appear as:
10 FOR A=0 TO 5
Spaces are accepted but not stored. The following line:
10 for a = 0 to 5
is compr essed and disp layed as in the se cond exam ple
above. Spaces are removed. However, spaces as part
of a remark or PRINT are not removed.
Instead of uploading and downloading programs, you can
save them to the on card EPRO M. This is useful if you
are using a terminal to write program s. Simply type
SAVE. To retrieve a progr am, type LOAD . Your
system has a 512K EPROM, so you can save and load
up to 7 programs using these commands. See SECTION
3 and Appendix A for more inform ation.