Specifications

BASIC Stamp II
Page 204 • BASIC Stamp Programming Manual 1.8 • Parallax, Inc.
The following list is a summary of the PBASIC instructions used by
the BASIC Stamp II.
This symbol indicates new or greatly improved instructions (compared to
the BASIC Stamp I).
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).