Chapter 1: Your Boe-Bot’s Brain
· Page 33
√
Briefly look over the
BASIC Stamp Manual
explanation of the
DEBUG
command.
√
Count the number of example programs in the
DEBUG
section. How many are
there?
Figure 1-49
Reviewing the
DEBUG
Command in the
BASIC Stamp
Manual
Your Turn
√
Use the
BASIC Stamp Manual
index to look up the
DEBUG
command.
√
Look up the
END
command in the
BASIC Stamp Manual
.
ACTIVITY #6: INTRODUCING ASCII CODE
In Activity #4: Your First Program, you used the
DEC
formatter with the
DEBUG
command
to display a decimal number in the Debug Terminal. But what happens if you don’t use
the
DEC
formatter with a number? If you use the
DEBUG
command followed by a number
with no formatter, the BASIC Stamp will read that number as an ASCII code.
Programming with ASCII Code
ASCII is short for American Standard Code for Information Interchange. Most
microcontrollers and PC computers use this code to assign a number to each keyboard
function. Some numbers correspond to keyboard actions, such as cursor up, cursor down,
space, and delete. Other numbers correspond to printed characters and symbols. The
numbers 32 through 126 correspond to those characters and symbols that the BASIC
Stamp can display in the Debug Terminal. The following program will use ACSII code to
display the words “BASIC Stamp 2” in the Debug Terminal.