Load – Remote Processing CAMBASIC User Manual

Page 107

Advertising
background image

Comm ands - 74

LOAD

Command

SYNTAX:

LOAD
L O A D program
L O A D program R U N
L O A D to RAM segment, RAM address, from me mory segm ent, memo ry address, length

PURPOSE:

LOAD with no parameters reads a program from Flash and puts it into RAM.

LOAD program retrieves a pr ogram from 0 or 1 in a 128K Flash E PROM or 0 to 7 in a 512K F lash
and puts it into RAM.

LOAD with all the other parameters transfers data from Flash to RAM or RAM to RAM.

REMARK S:

LOAD with no parameters is the only valid LOAD com mand on the RPC -150 and RPC-2300.

L O A D n RUN is used within a program to run another program. Pr ogram execution always starts at
the first program line.

The third syntax, from me mory segm ent, refers to the physical memory m ap and is in the range of 0
to 15. Segments 0-7 are always RAM while segments 8-15 are always Flash EPROM . The number
of segments actually available depe nd upon mem ory size for ea ch type. 12 8K RAM uses segments 0
and 1. 128K Flash use segments 8 and 9. A 512K RAM uses segments 0-7 while a 512K flash uses
segments 8-15.

The thir d syntax is usefu l for m oving blocks of mem ory ar ound fro m F lash to RAM or RA M to
RAM . U sing proper addressing, you can move and replace CA MBASIC arrays in RAM . U se the
SAVE com mand to store to Flash.

EXAMPLE:

LOAD

Loads a program from F lash segment 0.

LOAD n

Loads a program from F lash segment 0 to 7

LOAD 1,weight,1,&9000,4500

Loads 4500 bytes of data to R AM se gment 1, address

“w eight” from Flash segment 1, address &9000.

LOAD 1 RUN

Load pr ogram from Flash seg ment 1 an d runs it.

ERROR:

< Data ne gative> – for addr ess or leng th
< Data > 65, 535> – for addr ess or leng th
< Data > 2 or 7> for segment

Advertising