186
The VIC 20 User
Guide
giving the illusion
that
it
is
moving.
For
example, this program produces a
windshield with wipers that sweep back and forth.
113
DL',I=1513
213
REM
BUILD
WINDSHIELD
313
PRINT
u:']..--.."
49
PRINT
"I
I"
50
PRINT"
'---'''
69
REM
S~JEEP
WIPERS
TO
R
IOHT
79
FOR
1=1
TO
4
813
ON
I
C;OSLIB
1813,240,3013,360
99
FOR
J=l
TO
DLY
:
NE~T
190
NEXT
!
19
REM
SWEEP
~JIPERS
TO
LEFT
129
FOR
1=3
TO
2
STEP
-1
130
ON
I
GOSUB
1813.,
240,
300,
360
140
FOR
J=l
TO
DLY
:
NEXT
159
NEXT
169
(lOTO
713
179
REM
SHOW
WIPERS
AT
113
O'CLOCK
1813
POKE
7793,77
1913
POKE
7794,32
299
POKE
7795,77
2113
POKE
77136,32
2213
RETURN
230
REM
SHO~J
WIPERS
AT
12
O'CLOCK
249
POKE
7793,32
250
POKE
7794,191
269
POKE
77135,32
279
POKE
7796,191
289
RETURN
299
REM
SHOW
WIPERS
AT
2
O'CLOCK
399
POKE
7793,32
319
POKE
7794,78
329
POKE
7795,32
3313
POKE
77,136,78
349
RETURN
350
REM
SHOW
WIPERS
AT
3
O'CLOCK
3613
POKE
7794,1913
379
POKE
7796,199
389
RETURN
This program has several major parts.
We
will look
at
each in detail.
Lines
30
through
50
clear the screen and display the windshield using
PRINT
statements.
Lines 70 through
100
sweep the wipers from left to right. They are then
swept back to the left by lines
120
through
150.
These loops change the