EasyManua.ls Logo

Parallax BASIC Stamp 2e - Page 188

Default Icon
353 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.

Table of Contents

Related product manuals