BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333 • Page 31
BASIC Stamp II
ISHEX value Print value in signed hex w/’$’
ISHEX1-ISHEX4 value Print value in signed hex w/’$’ - 1-4 digits
BIN value Print value in binary
BIN1-BIN4 value Print value in binary - 1-4 digits
SBIN value Print value in signed binary
SBIN1-SBIN16 value Print value in signed binary - 1-4 digits
IBIN value Print value in binary w/’%’
IBIN1-IBIN16 value Print value in binary w/’%’ - 1-4 digits
ISBIN value Print value in signed binary w/’%’
ISBIN1-ISBIN16 value Print value in signed binary w/’%’ -1-4 digits
REP cannot be followed by a ‘?’, but ASC needs one.
DEBUG statements can contain many strings and numbers, separated
by commas. In addition, there are several special control characters
which are interpreted by the PC:
Name Value Effect
CLS 0 Clears the screen and homes the cursor
HOME 1 Homes the cursor
BELL 7 Beep the PC speaker
BKSP 8 Backspace - backs up the cursor
TAB 9 Advances to the next 8th column
CR 13 Carriage return - down to next line
Example program using DEBUG:
count var byte ’Define a byte variable called count
loop1: debug cls, bell ’Clear the screen and beep the speaker
loop2: debug sdec? sin count ’Show the signed-decimal sine of count
count = count + 1 ’Increment count
if count <> 0 then loop2 ’Loop until count rolls over
pause 1000 ’Pause for 1 second
goto loop1 ’Repeat the program