register is set to 0, the first line is covered, ready for new data. When the Y scrolling register is set to 7 the last row is covered.

For scrolling in the X direction, the scroll register is located in bits 2 to 0 of the VIC-II control register at location 53270 (\$D016 in HEX). As always, it is important to affect only those bits. The following POKE does this:

```   POKE 53270,(PEEK(53270)AND 248)+X
```
where X is the X position of the screen from 0 to 7.

For scrolling in the Y direction, the scroll register is located in bits 2 to 0 of the VIC-II control register at location 53265 (\$D011 in HEX). As always, it is important to affect only those bits. The following POKE does this:

```   POKE 53265,(PEEK(53265)AND 248)+Y
```
where Y is the Y position of the screen from 0 to 7.

To scroll text onto the screen from the bottom, you would step the low- order 3 bits of location 53265 from 0-7, put more data on the covered line at the bottom of the screen, and then repeat the process. To scroll characters onto the screen from left to right, you would step the low- order 3 bits of location 53270 from 0 to 7, print or POKE another column of new data into column 0 of the screen, then repeat the process.

If you step the scroll bits by -1, your text will move in the opposite direction.

EXAMPLE: Text scrolling onto the bottom of the screen:

``` 10 POKE53265,PEEK(53265)AND247        :REM GO INTO 24 ROW MODE
20 PRINTCHR\$(147)                     :REM CLEAR THE SCREEN
30 FORX=1TO24:PRINTCHR\$(17);:NEXT     :REM MOVE THE CURSOR TO THE BOTTOM
40 POKE53265,(PEEK(53265)AND248)+7:PRINT :REM POSITION FOR 1ST SCROLL
50 PRINT"     HELLO";
60 FORP=6TO0STEP-1
70 POKE53265,(PEEK(53265)AND248)+P
80 FORX=1TO50:NEXT                    :REM DELAY LOOP
90 NEXT:GOTO40
```

 This page has been created by Sami Rautiainen. Read the small print. Last updated May 12, 2002.