Getting started, Line format, Line renumbering – Remote Processing CAMBASIC User Manual

Page 7

Advertising
background image

Concepts - 1

Getting Started

To program in CAMBASIC you will need a terminal to interface with your CPU card. This may be a CRT terminal or a
PC configured as a terminal. If you use the PC, you will need additional software for your PC to communicate.
S m a r tL I N K

turns your P C into a progr am developm ent workstation. See your har dware m anual for setup instructions.

You should review the CAM BASIC comm ands in Chapter 4 of this manual. D on’t be overwhelmed by the number of
comm ands available . M ost progr ams use o nly a limited nu mber of comm ands. You will find that most com mands in
CAM BASIC are familiar to you if you have ever programmed in any basic before.

On power– up a message is printed like that below. If a nonsense message appears, your terminal is not set at 19,200
baud, one start bit, 8 data bits, one stop bit and n o parity. The am ount of fre e mem ory is pr oduct depen dent.

CAMBASIC (TM) Version 1.00
© 1985–93 Octagon Systems Corp
© 1994 Remote Processing Corp.
All rights reserved

Free 30482

> _

The underline ( _ ) shown to the right of the “> ” pr ompt represents the cursor position. Y our cursor m ay be a block or
o th e r ch a r ac t er d e pe n di ng u po n yo u r sy s te m .

This m ode is useful for debugging a nd for usin g CA MBA SIC as a c alculator f or quick c omputation s. V irtually all
statements and commands may be used in this mode. M emory may be read and modified. Data may be sent to or read
from por ts.

The Progr am Mode is used for entering pr ograms. Program lines are always preceded by line numbers. Execution begins
after RUN is entered. The pr ogram m ay be run as many times as desired. You can enter a program in either upper or
lower case.

Line Format

Every progr am begins with a line number. Line numbers m ay range from 1 to 65529.

Prog ram s are stor ed and r un in RAM , in line number order , r egardle ss of the entr y sequence . P rogr ams ar e compile d into
an intermediate code to speed execution. The average com piled program will use about 10% more m emory than the
keystrokes you typed or disk memory used. This number can vary 20% either way, depending upon the type of program
you are writing.

A compiler limits a program line to 159 characters. M ore than one statement may reside on a line as long as the
statements are separated by colons (:). Putting more than one statement on a line will cause somewhat faster program
execution and use less memory.

Line Renumbering

CAM BASIC can renum ber your progr am. Typing in RENU M will automatically renumber your program in line steps of
1 0 be g in n in g wi th li ne 1 0. Y o u ca n op ti on a ll y s p ec i fy th e st a rt in g li ne n um b e r a n d s te p va l ue . R e fe r to th e RE N U M
command.

Advertising