EasyManua.ls Logo

Commodore Plus 4 - Page 223

Commodore Plus 4
464 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...
Graphics
Programming
in
BASIC
211
more
of
the
left
column
is
revealed,
and
the
second
column
from
the
right
is
concealed.
When
the
scrolling
position
is
7,
all
but
the
left
pixel
of
the
left
column
is
visible,
and
all
but
the
right
pixel
of
the
second
column
from
the
right
is
invisible.
If
the
information
in
each
column
is
moved
right,
and
a
new
column
is
added
on
the
left
while
the
scrolling
position
is
simultaneously
cleared
to
0,
a
smooth
right
scroll
is
obtained.
This
is
best
done
in
machine
code.
A
left
scroll
is
obtained
by
reversing
the
procedure.
Smooth
Scrolling
Example Program
10
SOTCLR:FORI=0TO24:GOSUB120:NEXT
20
SR=65286
30
FORT=1TO2O:NEXT
40
P0KESR,(PEEK(SR)AND240)0R7
50
G0SUB120
60
F0RI=6T00STEP-l
70
P0RT=lT060:]SrEXT
80
POKESR,(PEEK(SR)A1TD24O)ORI
90
1OJXT
100
GETK$:IFK$=""THEITG0T030
110
P0KESR,(PEEK(SR)A]SrD240)0Rll:E]SrD
120
PRI1TTCHR$(13)
"HIT
A
KEY
TO
STOP
SCROLLING";:RETURN
Line-by-Line
Explanation
10
Clear
the
screen
and
fill
it
with
the
message.
20
Set
SR
to
scroll
register
address.
30
Wait
loop.
40
Set
to
24
lines
and
set
the
scroll
register
value
to
7.
50
Put
the
message
on
the
hidden
line.
60
Count
down
for
scroll
register
value.
70
Wait
loop.
80
Set
scroll
register
value.
90
Go
back
for
next
value.
100
See
if
a
key
has
been
pressed.
If
not,
return
to
line
30.
110 Set
to
25
lines
and
the
default
scroll
register
value
(3).
120
Subroutine
to
print
carriage
return
followed
by
message.

Other manuals for Commodore Plus 4

Related product manuals