5: BASIC Stamp Command Reference – RUN
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 269
RUN
BS1 BS2
BS2e BS2sx BS2p
RUN
Program
Function
Switches execution to another BASIC Stamp program (in a different
program slot).
•
Program
is a variable/constant/expression (0 – 7) that specifies the
program slot to run.
Quick Facts
BS2e
BS2sx
BS2p
Number of
program slots
8 (numbered 0 to 7)
Time delay to
switch between
program slots
770
µ
s
300
µ
s
250
µ
s
Special notes
RUN is similar to a GOTO… you can not "return" from a RUN
Explanation
The BS2e, BS2sx and BS2p have a total of 16k bytes of code space. This
code space is organized into eight slots of 2 kbytes each. Up to eight
different programs can be downloaded to the BASIC Stamp (one program
per slot). When the BASIC Stamp powers up, or is reset, the program in
slot 0 is executed.
The RUN command allows you to activate another program and causes
the BASIC Stamp to stay in the newly activated program until it receives
another RUN command, or until a power-down or reset condition occurs.
The RUN command is similar to a GOTO command in that it allows you
to "goto" another program. Normally a master-type program will be used
in program slot 0 (since slot 0 runs first) and will control initial execution
of the other programs.
Look at the following example (there are two programs here, make sure to
download them into program slots 0 and 1, respectively):
e
2
sx
2
p
2
Table 5.69: RUN Quick Facts.
A
SIMPLE EXAMPLE OF
RUN.
Содержание BASIC Stamp 2e
Страница 1: ...BASIC Stamp Programming Manual Version 2 0c...
Страница 30: ...Introduction to the BASIC Stamps Page 28 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 90: ...BUTTON BASIC Stamp Command Reference Page 88 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 118: ...END BASIC Stamp Command Reference Page 116 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 128: ...FREQOUT BASIC Stamp Command Reference Page 126 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 196: ...NAP BASIC Stamp Command Reference Page 194 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 206: ...OWIN BASIC Stamp Command Reference Page 204 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 214: ...OWOUT BASIC Stamp Command Reference Page 212 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 216: ...PAUSE BASIC Stamp Command Reference Page 214 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 226: ...POLLMODE BASIC Stamp Command Reference Page 224 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 232: ...POLLOUT BASIC Stamp Command Reference Page 230 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 236: ...POLLRUN BASIC Stamp Command Reference Page 234 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 240: ...POLLWAIT BASIC Stamp Command Reference Page 238 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 262: ...RCTIME BASIC Stamp Command Reference Page 260 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 274: ...RUN BASIC Stamp Command Reference Page 272 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 310: ...SEROUT BASIC Stamp Command Reference Page 308 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 324: ...STOP BASIC Stamp Command Reference Page 322 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...