BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333 • Page 11
BASIC Stamp II
BRANCHING
IF...THEN Compare and conditionally branch.
BRANCH Branch to address specified by offset.
GOTO Branch to address.
GOSUB Branch to subroutine at address. GOSUBs may be
nested up to four levels deep, and you may have
up to 255 GOSUBs in your program.
RETURN Return from subroutine.
LOOPING
FOR...NEXT Establish a FOR-NEXT loop.
NUMERICS
LOOKUP Lookup data specified by offset and store in vari-
able. This instruction provides a means to make a
lookup table.
LOOKDOWN Find target’s match number (0-N) and store in
variable.
RANDOM Generate a pseudo-random number.
DIGITAL I/O
INPUT Make pin an input
OUTPUT Make pin an output.
REVERSE If pin is an output, make it an input. If pin is an
input, make it an output.
LOW Make pin output low.
HIGH Make pin output high.
TOGGLE Make pin an output and toggle state.
PULSIN Measure an input pulse (resolution of 2 µs).
The following list is a summary of the BASIC instructions used by the
BASIC Stamp II. Later in this pamphlet, you’ll find complete descrip-
tions of each instruction.
◆ This symbol indicates new or greatly improved instructions (compared to
the BASIC Stamp I).