LOOKUP - BASIC Stamp Command Reference
Page 186
•
BASIC Stamp Programming Manual 2.0b
•
www.parallaxinc.com
Demo Program (LOOKDOWN.bas)
' This program uses Lookup to create a debug-window animation of a spinning propeller.
' The animation consists of the four ASCII characters | / - \ which, when printed rapidly
' in order at a fixed location, appear to spin. (A little imagination helps a lot here.)
'{$STAMP BS1} 'STAMP directive (specifies a BS1)
SYMBOL I = B0
SYMBOL Frame = B1
Rotate:
FOR I = 0 TO 3
LOOKUP I,("|/-\"),Frame
DEBUG CLS, @Frame
PAUSE 50
NEXT
GOTO Rotate
Demo Program (LOOKUP.bs2)
' This program uses Lookup to create a debug-window animation of a spinning propeller.
' The animation consists of the four ASCII characters | / - \ which, when printed rapidly
' in order at a fixed location, appear to spin. (A little imagination helps a lot here.)
'{$STAMP BS2} 'STAMP directive (specifies a BS2)
I VAR NIB
Frame VAR BYTE
Rotate:
FOR I = 0 TO 3
LOOKUP I,["|/-\"],Frame
DEBUG HOME, Frame
PAUSE 50
NEXT
GOTO Rotate
1
2
e
2
sx
2
p
2
NOTE: This is written for the BS2
but can be used for the BS2e,
BS2sx and BS2p also. Locate the
proper source code file or modify
the STAMP directive before
downloading to the BS2e, BS2sx or
BS2p.
Summary of Contents for BASIC Stamp 2e
Page 1: ...BASIC Stamp Programming Manual Version 2 0c...
Page 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...