Rpbasic-52 programming guide, Execute – Remote Processing BASIC 52 User Manual
Page 55
RPBASIC-52 PROGRAMMING GUIDE
2-36
EXECUTE
Syntax:
EXECUTE [segme nt]
Where: segment = program to execute
Function:
Loads and runs program specified by segment.
Mode:
C O M M A N D , R U N
Use:
EXECUTE n
Cards:
RPC-320, RPC-330
D E S C R IP T I ON
Com man d gets a progra m from the flas h EPR OM and ex ecute s it. segment specie s the pro gram to exe cute.
The program saved by the S AVE n comm and is execute d. The range o f segment depends upon the flash
EPROM size. See the SAVE comm and for more information.
The effect of E XEC UTE is the same a s typing LO AD n, then RUN . The difference is E XEC UTE is part of a
p ro g ra m .
NOTE: Every time EX ECUT E is run, all variables and strings are reset. Variables and strings CANNOT be
passed from one program to another except through peeking and poking to RAM. ONTIC K and
O N I T R in t er r up t s a r e c l ea r ed a s i s O N ER R .
String and numeric data can be saved for use by other programs using any of the POKE and PEEK
statemen ts. Data can be POKE d in to space ab ove MT OP (7E0 0H in a 32K RAM system) or into m emory
segmen t 1 (128K R AM) o r 1-7 (512K R AM).
Some parameters are not cleared by running EXECUTE. These are the tick timers (TICK), serial
communication buffers, and data saved by POKEing. No hardware conditions are reset. No parameters set
by any CO NFIG sta tement are reset.
Loading and executing time depend upon program length. 0.22 seconds is required for clearing variables and
resettin g Ba sic. Ad d to this time the ac tual tra nsfer tim e. Tran sfer tim e is at a rate of 5 0,000 b ytes/se cond.
A 20K program requires about 0.4 seconds to begin running after the EXECU TE statement is finished.
RELATED
L O A D , S A V E
E R R O R
BAD A RGUM ENT when segment is out of range.
EXAMPLE
The first lines were saved to program segment 0. The second set to 1.
10 PRINT "Program number 0"
20 EXECUTE 1
>save 0
10 PRINT "Program number 1"
20 EXECUTE 0
>save 1
>run
Program number 0
Program number 1
Program number 0