Parallax BASIC Stamp II Manual page 18

Table of Contents

Advertisement

The compiler will group all words, bytes, nibs, and bits, and respec-
tively arrange them into unused RAM. By pressing Alt-M, you can see
a picture of the RAM allocation. First, the three I/O words are shown,
then all words, bytes, nibs, and finally, bits, are seen. Empty RAM
follows. Alt-M is a quick way to assess how much RAM you've used.
The VAR usage options are as follows:
'define unique variables
sym1
VAR bit
sym2
VAR nib
sym3
VAR byte
sym4
VAR word
'After bit/nib/byte/word a value may be placed
'within parentheses to declare an array size:
sym5
VAR nib (10)
'define variables-within-variables or alias variables
sym6
VAR sym4.highbit
sym7
VAR sym4.lowbit
sym8
VAR sym2
'When using VAR to assign non-unique variables (a variable
'name is used in lieu of bit/nib/byte/word(size)), a period may
'be placed after the variable name and followed by modifiers.
'Modifiers are used to identify sub-pieces of the initially-
'mentioned variable.
sym9
VAR sym4.highbyte.lownib.bit2
Here are all the variable modifiers:
LOWBYTE
HIGHBYTE
BYTE0
BYTE1
Page 18 • BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333
BASIC Stamp II
'make a bit variable
'make a nibble variable
'make a byte variable
'make a word variable
'make a 10 nibble array
'make a bit variable of sym4's highbit
'make a bit variable of sym4's lowbit
'make an alternate name for sym2
'low byte of a word
'high byte of a word
'byte0 (low byte) of a word
'byte1 (high byte) of a word
'picky, picky...

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp II and is the answer not in the manual?

Table of Contents