Remote-processing RPC-210 Manuel d'utilisateur Page 27

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 60
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 26
RAM BASIC SECTION 5
Page 5-2
For this example, suppose there are 20 of these arrays
that need to be set up. A program fragment is as
follows:
100 STRING 400,20 Initialize 20 string arrays
300 NO = 12 Element to fill
310 CF = 23.432 Correction factor
320 JC = JC + 1 Job counter
330 AC = 25 Analog offset
350 GOSUB 1000
500 NO = 5 Element to retrieve
510 GOSUB 2000 Retrieve variables
This subroutine stores variables CF, JC, A C, and string
$(1) into an array starting in segment 1, address 0.
1000 POKEB1,30*NO, JC
1010 POKEW1,30*NO+ 1,AC
1020 POKEF1,30*NO+ 3,CF
1030 POKE$1, 30*NO+ 9,$(1)
1040 RETURN
Subroutine 2000 - 2040 retrieves data into variables CF,
JC and AC.
2000 JC = PEEKB(1,30*NO)
2010 AC = PEEKW (1,30*NO+ 1)
2020 CF = PEEKF (1,30*NO+ 3)
2030 $(1) = PEEK$(1, 30*NO+ 9)
2040 RETURN
You can store and retrieve strings and other kinds of
variables in this way. There are many variations of
PEEK and POKE statements. Refer to the RPBASIC-52
Software Supplement in this manual for additional
information and examples. A list of commands appears
at the end of this section.
RESERVED MEMORY
Generally, writing to RAM segment 0 should be
avoided.
The upper 256 bytes of RAM in segment 0 are set aside
for system use and should not be used to POKE
variables. Avoid writing to addre sses 0FF 00H to
0FFFFH, especially when writing to Flash EPROM.
Program s and RPBASIC-52 variables reside in segment
0. Writing to them could corrupt the program and/ or
variable data.
Data using PEE K and PO KE com mands are generally
stored in segment 1 to 7 (a segment is 64K of memory).
COMMANDS
The following is a list of RPBASIC-52 commands used
with RAM and Flash EPROM.
Command Format
BLOAD Transfers data from EPROM to RAM
BSAVE Transfers data from RAM to EPROM
CALL Calls an assembly language routine
PEEK B Returns a byte
PEEK F Returns a floating point number
PEEK W Returns a 16 bit number
PEEK $ Returns a string
POKE B Stores a byte to RAM
POKE F Stores a floating point number to
RAM
POKE W Stores a16 bit number to RAM
POKE $ Stores a string to RAM
XBY Reads or writes external mem ory,
segment only.
NOTE: Futur e version (Perhaps starting in 2012) will
have an enhanded BSAVE command. The
newer BSAVE com mand will have an erase
flash sector capability. Contact R emote
Processing for mor e information.
Vue de la page 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 59 60

Commentaires sur ces manuels

Pas de commentaire