BASIC stamp manual v2.2
5: BASIC Stamp Command Reference – STORE
BASIC Stamp Syntax and Reference Manual 2.2 • www.parallax.com • Page 451
Demo Program (STORE1.bsp)
' STORE1.bsp
' {$STAMP BS2p}
' {$PBASIC 2.5}
idx VAR Word ' index
value VAR Byte
LocalData DATA @0, 6, 7, 8, 9, 10
Main:
GOSUB Show_Slot_Info ' show slot info/data
PAUSE 2000
STORE 0 ' point READ/WRITE to Slot 0
GOSUB Show_Slot_Info
PAUSE 2000
RUN 2 ' run program in Slot 2
END
Show_Slot_Info:
GET 127, value
DEBUG CR, "Pgm Slot: ", DEC value.NIB0,
CR, "R/W Slot: ", DEC value.NIB1,
CR, CR
FOR idx = 0 TO 4
READ idx, value
DEBUG "Location: ", DEC idx, TAB,
"Value: ", DEC3 value, CR
NEXT
RETURN
Demo Program (STORE2.bsp)
' STORE2.bsp
' {$STAMP BS2p}
' {$PBASIC 2.5}
idx VAR Word ' index
value VAR Byte
LocalData DATA @0, 11, 12, 13, 14, 15
Main:
GOSUB Show_Slot_Info ' show slot info/data
PAUSE 2000
STORE 0 ' point READ/WRITE to Slot 0
NOTE: This example program can be
used with the BS2p, BS2pe, and
BS2px by changing the $STAMP
directive accordingly.
NOTE: This example program can be
used with the BS2p, BS2pe, and
BS2px by changing the $STAMP
directive accordingly.