Specifications

BASIC Stamp II
Page 224 • BASIC Stamp Programming Manual 1.8 • Parallax, Inc.
What if you use something other than a “low” modifier, say
myBytes.highnib()? That will work, but its only effect will be to start
the nibble array with the high nibble of myBytes(0). The nibbles you
address with this nib array will all be contiguous—one right after the
other—as in the previous example.
myBytes var byte(10) ‘ Define 10-byte array.
myBytes(0) = $AB ‘ Hex $AB into 0th byte
myBytes(1) = $CD ‘ Hex $CD into next byte
debug hex ? myBytes.highnib(0) ‘ Show high nib of cell 0 ($A)
debug hex ? myBytes.highnib(1) ‘ Show next nib ($D)
This property of modified arrays makes the names a little confusing. If
you prefer, you can use the less-descriptive versions of the modifier
names; bit0 instead of lowbit, nib0 instead of low nib, and byte0 in-
stead of low byte. These have exactly the same effect, but may be less
likely to be misconstrued.
You may also use modifiers with the 0th cell of an array by referring to
just the array name without the index value in parentheses. It’s fair
game for aliases and modifiers, both in VAR directives and in instruc-
tions:
myBytes var byte(10) ‘ Define 10-byte array.
zipBit var myBytes.lowbit ‘ Bit 0 of myBytes(0).
debug ? myBytes.lownib ‘ Show low nib of 0th byte.
Memory Map
If you’re working on a program and wondering how much variable
space you have left, you can view a memory map by pressing ALT-M.
The Stamp host software will check your program for syntax errors
and, if the program’s syntax is OK, will present you with a color-coded
map of the available RAM. You’ll be able to tell at a glance how much
memory you have used and how much remains. (You may also press
the space bar to cycle through similar maps of EEPROM program
memory.)
Two important points to remember about this map are: