BASIC stamp manual v2.2
BASIC Stamp Architecture – Scratch Pad RAM
Page 92 • BASIC Stamp Syntax and Reference Manual 2.2 • www.parallax.com
The BS2e, BS2sx, BS2p, BS2pe, and BS2px have some additional RAM
called Scratch Pad RAM. The BS2e and BS2sx have 64 bytes of Scratch Pad
RAM (0 to 63) and the BS2p, BS2pe, and BS2px have 136 bytes of Scratch
Pad RAM (0-135). Scratch Pad RAM can only be accessed with the GET
and PUT commands and cannot have variable names assigned to it. Table
4.4 shows the layout of all SPRAM registers.
Notice that the highest locations in Scratch Pad RAM (location 63 in the
BS2e and BS2sx, locations 127-135 in the BS2p, BS2pe, and BS2px) are
special-purpose, read-only locations that always contain special run-time
information. For example, the lowest nibble of location 63 (BS2e and
BS2sx) or 127 (BS2p, BS2pe, and BS2px) contains the number of the
currently running program slot. This is handy for programs that need to
know which program slot they exist in. In the BS2p, BS2pe, and BS2px,
the high nibble of location 127 holds the slot designated for READ and
WRITE; see the STORE command on page 449 for more information.
SCRATCH PAD RAM