STORE - BASIC Stamp Command Reference
' -------------------------- Main Routines --------------------------
Main:
GOSUB DisplaySlotsAndReadData
PAUSE 2000
STORE 1
GOSUB DisplaySlotsAndReadData
PAUSE 2000
RUN 1
'Switch to program 1
' --------------------------- Subroutines ---------------------------
DisplaySlotsAndReadData:
GET 127, Value
DEBUG CR, "Prog Slot: ", DEC1 Value.LOWNIB
DEBUG " R/W Slot: ", DEC1 Value.HIGHNIB, CR, CR
FOR Idx = 0 TO 4
READ Idx, Value
DEBUG "Location: ", DEC Idx, " Value: ", DEC3 Value, CR
NEXT
RETURN
Demo Program (STORE1.bsp)
DATA @0, 6, 7, 8, 9, 10
Idx
VAR
WORD
Value
VAR
BYTE
' -------------------------- Main Routines --------------------------
Main:
GOSUB DisplaySlotsAndReadData
PAUSE 2000
STORE 0
GOSUB DisplaySlotsAndReadData
PAUSE 2000
RUN 2
' --------------------------- Subroutines ---------------------------
DisplaySlotsAndReadData:
GET 127, Value
DEBUG CR, "Prog Slot: ", DEC1 Value.LOWNIB
DEBUG " R/W Slot: ", DEC1 Value.HIGHNIB, CR, CR
FOR Idx = 0 TO 4
READ Idx, Value
DEBUG "Location: ", DEC Idx, " Value: ", DEC3 Value, CR
NEXT
RETURN
Page 324 • BASIC Stamp Programming Manual 2.0b • www.parallaxinc.com
'Switch to READ/WRITE slot 1
'Switch to READ/WRITE slot 0
'Switch to program 2
2
p
Need help?
Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?