Rpbasic-52 programming guide – Remote Processing BASIC 52 User Manual

Page 4

Advertising
background image

RPBASIC-52 PROGRAMMING GUIDE

1-1

PREFACE

This programming guide is for Remote Processing
controllers using RPBASIC-52 language. It was
derived from Intel MCS-51 BASIC, V1.1. Several
command extensions and features have been added
to effectively speed up command execution.

M

Buffered serial p orts. Received characters are
buffered to 256 ch aracters. PRIN T strings are
put into a 256 character buffer, making it much
faster.

M

M u l ti - ta s k in g c on s tr u ct s su c h as O N L IN E , O N
COM, ON C OUNT, and ON KE YPAD. Lines
and keypad are monitored at assembly language
speed on every 5 ms tick time. This speeds up
program execution because the main program
no longer has to monitor these points.

M

Softw are co mm ands d irectly suppo rt hardw are.
DA TE a nd TIM E wo rk with the rea l time clock .
AIN reads a voltage while AOT outputs one.

Some cards do not have all hardware features so do
not support all of the commands. Cards supported or
e x ce p ti on s ar e l is te d w it h e a ch c om m a n d. In s om e
cases you must refer to your hardware manual for
exact ranges.

A few original BASIC-52 commands have been
removed. These commands w ere oriented around
specific registers in the 8 052 chip or a spe cific
design. For example, the PROG command assumed
code is stored in an EPROM. Remote Processing
cards use a flash EPROM which uses a new
programming algorithm. The PROG command was
replaced with SAVE.

MANUAL CONVENTIONS

Information appearing on your screen is shown in a
different type.

Example:

RPBASIC-52 V1.0
Copyright Remote Processing (1995)
Bytes free: 27434

Symbols and Terminology

<xxx>

Paired angle brackets are used to indicate a
specific key on your keyboard. For
example, <esc> means the escape key.

expr

Term m eaning a num ber, simple
variable, or mathematical expression
involving variables and numbers. The
following are valid expr:

45.3
B
CYCLE
B*45
C*D+54
I N T (D )

expr can be anoth er func tion.
Com plexity of expr is limited by
available stack mem ory. Usually this is
7 levels of parentheses.

For cla rity, expr m a y be a no th e r n a m e
such as position, channel, and so on.

italic

Italicized variables require an
expression or value. For example:

A I N (channel)
K E Y P A D (function)

Ellipsis (...) follow an instruction w hich optionally
accept more data.

D A T A data[,data][,data] ...
R E A D variable[,variable]...

Optional portion s of an instruction are e nclosed in
brackets []:

D I S P LA Y option[,option][,option]

Advertising