Table of Contents

Advertisement

5: BASIC Stamp Command Reference – STORE
STORE
2
STORE ProgramSlot
p
Function
Designate a program slot for the READ/WRITE instructions to operate
upon.
• ProgramSlot is a variable/constant/expression (0 – 7) that specifies
the program slot to use for READ and WRITE instructions.
Explanation
STORE tells the BS2p which program slot to use when a READ or WRITE
instruction is executed. The STORE command only affects the READ and
WRITE instructions.
The STORE command allows a program to access all EEPROM locations
that exist on the BS2p, regardless of which program is running or which
program slot is active. The READ and WRITE commands can only access
locations 0 to 2047 within a single program slot. The STORE command
switches the program slot that the READ and WRITE commands operate
on.
The default program slot that the READ and WRITE instructions operate
on is the currently running program. The STORE command can be used
to temporarily change this, to any program slot. The change will remain
in effect until another STORE command is issued, or until another
program slot is executed.
2
Demo Program (STORE0.bsp)
p
' This program demonstrates the STORE command and how it affects the READ and WRITE
' commands. This program "STORE0.BSP" is intended to be downloaded into program
' slot 0. It is meant to work with STORE1.BSP and STORE2.BSP. Each program is very
' similar (they display the current Program Slot and Read/Write Slot numbers and the
' values contained in the first five EEPROM locations. Each program slot will have
' different data due to different DATA commands in each of the programs downloaded.
'{$STAMP BS2p, Store1.bsp, Store2.bsp}
DATA @0, 1, 2, 3, 4, 5
Idx
VAR
WORD
Value
VAR
BYTE
BASIC Stamp Programming Manual 2.0c • www.parallaxinc.com • Page 323
BS1
BS2
BS2e BS2sx
'STAMP directive (specifies a BS2p)
BS2p

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?

Table of Contents