Scrolling

From C64-Wiki
Jump to navigationJump to search
Stub This article is very short and not very detailed. Please help to improve it.
Demo scrolling.asm (slow animation!)

Since the 1970s, scrolling has been a fundamental aspect of computer technology. Scrolling is a programming technique that allows text to move horizontally or vertically on the screen. It is commonly used in computer games and demos, but it can be applied in various other programs as well.


Kinds of Scrolling[edit | edit source]

Technical Information[edit | edit source]

  • Horizontal (x) srolling register: 53270 (low 3 bit)
  • Vertical (y) scrolling register: 53265 (low 3 bit)

Examples[edit | edit source]

BASIC


An easy BASIC example for a text scrolling demonstration:

10 PRINT CHR$(147)
20 PRINT "SMOOTH SCROLLING TEXT"
30 FOR A=0 TO 7
40 POKE 53270,A : POKE 53265,A
50 NEXT A

Another text scrolling with color and another programming method:
The scrolling text is in the variable LF$.

9 PRINT CHR$(147)CHR$(14): POKE 53280,PEEK(53281)
10 LF$="                                     "
11 LF$=LF$+"    * * * The C64-Wiki is fantastic ! * * *      Created by Jodigi    "
12 LF$=LF$+"    Copyright 2016        Stop with RUN/STOP key !!!             "
13 FOR X=1 TO LEN(LF$)
14 POKE 781,11:POKE 782,5:POKE 783,0:SYS 65520:PRINT MID$(LF$,X,30)
15 FOR Y=55741 TO 55770:POKE Y,X: NEXT Y,X
16 GOTO 13

Vertical scrolling: An alternative scrolling method:

0 PRINT"{clr}"
1 PRINT"{home}{down}"INT(RND(.)*100)
2 PRINT"{home}{down}{left}"CHR$(148)
3 POKE218,PEEK(218)OR128
4 GOTO1

Links[edit | edit source]

WP-W11.png Wikipedia: Scrolling