EasyManua.ls Logo

Parallax BASIC Stamp 2e - Page 326

Default Icon
353 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STORE - BASIC Stamp Command Reference
Page 324 BASIC Stamp Programming Manual 2.0b www.parallaxinc.com
' -------------------------- Main Routines --------------------------
Main:
GOSUB DisplaySlotsAndReadData
PAUSE 2000
STORE 1 'Switch to READ/WRITE slot 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 'Switch to READ/WRITE slot 0
GOSUB DisplaySlotsAndReadData
PAUSE 2000
RUN 2 'Switch to program 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
p
2

Table of Contents

Related product manuals