Specifications

BASIC Stamp I and Stamp II Conversions
Page 382 • BASIC Stamp Programming Manual 1.8 • Parallax, Inc.
BS2 to BS1 Register Allocation Conversion
Stamp II Variable Type / Register Name Stamp I Register Name
INS PINS
OUTS PINS
DIRS DIRS
WORD W0..W6
BYTE B0..B13
NIB B0..B13*
BIT BIT0..BIT15**
* There are no registers on the Stamp I which are nibble addressable. The best
possible solution is to place one or two nibble variables within a byte regis-
ter and modify the code accordingly.
** The only general purpose registers on the Stamp I which are bit addressable
are B0 and B1. BIT0..BIT7 correspond to the bits within B0 and BIT8..BIT15
correspond to the bits within B1. If you have a set of bit registers in the
Stamp II program, you should reserve B0 and B1 for this bit usage; i.e.: do
not assign any other symbols to B0 or B1.
3.On all variable and constant declarations, replace the variable or
constant directive, ‘VAR’ or ‘CON’, with an equal sign, ‘=’.
ASSIGNMENT CONVERSION: BS1 Q BS2
1.Remove the ‘LET’ command if it is specified.
2.If PINS or PIN0..PIN7 appears to the left, or to the left and right, of
the equal sign, ‘=’, replace PINS with OUTS and PIN0..PIN7 with
OUT0..OUT7.
3.If PINS or PIN0..PIN7 appears to the right of the equal sign, ‘=’,
replace PINS with INS and PIN0..PIN7 with IN0..IN7.
4.If PORT appears in an assignment, determine which byte (PINS or
DIRS) is affected and replace PORT with the corresponding Stamp
II symbol (INS, OUTS or DIRS). If both bytes are affected, separate
assignment statements may be needed to accomplish the equiva-
lent effect in the Stamp II.