Specifications
BASIC Stamp II
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 225
2
(1) It does not correlate the names of your variables to their locations.
The Stamp software arranges variables in descending order of
size, starting with words and working downward to bits. But
there’s no way to tell from the memory map exactly which
variable is located where.
(2) Fixed variables like B3 and W1 and any aliases you give them do
not show up on the memory map as memory used. The Stamp
software ignores fixed variables when it arranges automatically
allocated variables in memory. Fixed and allocated variables can
overlap. As we’ve said before, this can breed some Godzilla-sized
bugs!
BS2 Constants and Compile-Time Expressions
Suppose you’re working on a program called “Three Cheers” that
flashes LEDs, makes hooting sounds, and activates a motor that crashes
cymbals together—all in sets of three. A portion of your PBASIC2 pro-
gram might contain something like:
FOR count = 1 to 3
GOSUB makeCheers
NEXT
...
FOR count = 1 to 3
GOSUB blinkLEDs
NEXT
...
FOR count = 1 to 3
GOSUB crashCymbals
NEXT
The numbers 1 and 3 in the line FOR count = 1 to 3... are called con-
stants. That’s because while the program is running nothing can hap-
pen to change those numbers. This distinguishes constants from vari-
ables, which can change while the program is running.
PBASIC2 allows you to use several numbering systems. By default, it
assumes that numbers are in decimal (base 10), our everyday system
of numbers. But you can also use binary and hexadecimal (hex) num-
bers by identifying them with prefixes. And PBASIC2 will automati-
cally convert quoted text into the corresponding ASCII code(s).










