Scrolls

Developer(s): Tim Hartnell
Date: 1983
Type: Program
Platform(s): TS 2068

Scroll in any direction.

Appears on

Library tape from the Sinclair Computer Users Society (SINCUS).

Related Content

Source Code

    4 REM ++ Scrolls in basic ++++
    5 REM From Mastering Your Timex       & by Hartnell and Jones
    6 BORDER 6: PAPER 6: CLS 
    8 INK 0
   10 PRINT AT 2,6;"SCROLLS IN BASIC";TAB 6;"----------------"
   11 PRINT AT 5,6;"1. Scroll upwards";AT 7,6;"2. Scroll downwards";AT 9,6;"3. Scroll to the left";AT 11,6;"4. Scroll to the right";AT 13,6;"5. Scroll up with wrap";AT 15,6;"6. Scroll down with wrap";AT 17,6;"7. Scroll left with wrap";AT 19,6;"8. Scroll right with wrap"
   12 INPUT "Which scroll?  ";a
   13 IF a<1 OR a>8 THEN GO TO 12
   14 IF a=1 THEN GO TO 9500
   15 IF a=2 THEN GO TO 9530
   16 IF a=3 THEN GO TO 9560
   17 IF a=4 THEN GO TO 9620
   18 IF a=5 THEN GO TO 9670
   19 IF a=6 THEN GO TO 9710
   20 IF a=7 THEN GO TO 9750
   21 IF a=8 THEN GO TO 9800
 9500 REM --------scroll up
 9510 DIM a$(704)
 9511 INPUT "Enter text: ";a$
 9512 FOR n=0 TO 22
 9513 PRINT AT 0,0;a$
 9515 LET a$=a$(33 TO )+"                                "
 9520 NEXT n
 9525 GO TO 1
 9528 REM ---------scroll down
 9530 DIM a$(704)
 9535 INPUT "Enter text: ";a$
 9537 FOR n=0 TO 22
 9540 PRINT AT 0,0;a$
 9545 LET a$="                                "+a$( TO 672)
 9550 NEXT n
 9555 GO TO 1
 9560 REM -------scroll left
 9565 DIM a$(704)
 9570 INPUT "Enter text: ";a$
 9575 FOR n=0 TO 32
 9580 PRINT AT 0,0;a$
 9585 FOR f=1 TO 673 STEP 32
 9590 LET a$(f TO f+31)=a$(f+1 TO f+31)+" "
 9595 NEXT f
 9600 NEXT n
 9605 GO TO 1
 9620 REM --------scroll right
 9625 DIM a$(704)
 9630 INPUT "Enter text: ";a$
 9635 FOR n=0 TO 32
 9640 PRINT AT 0,0;a$
 9645 FOR f=1 TO 673 STEP 32
 9650 LET a$(f TO f+31)=" "+a$(f TO f+30)
 9655 NEXT f
 9660 NEXT n
 9665 GO TO 1
 9670 REM ----scroll up with wrap
 9675 DIM a$(704)
 9680 INPUT "Enter text: ";a$
 9685 FOR n=0 TO 22
 9690 PRINT AT 0,0;a$
 9695 LET a$=a$(33 TO )+a$( TO 32)
 9700 NEXT n
 9705 GO TO 1
 9710 REM ----scroll down with   wrap
 9715 DIM a$(704)
 9718 INPUT "Enter text: ";a$
 9720 FOR n=0 TO 22
 9725 PRINT AT 0,0;a$
 9730 LET a$=a$(673 TO )+a$( TO 672)
 9735 NEXT n
 9740 GO TO 1
 9750 REM --scroll left with wrap
 9755 DIM a$(704)
 9760 INPUT "Enter text: ";a$
 9765 FOR n=0 TO 32
 9770 PRINT AT 0,0;a$
 9775 FOR f=1 TO 673 STEP 32
 9780 LET a$(f TO f+31)=a$(f+1 TO f+31)+a$(f)
 9785 NEXT f
 9790 NEXT n
 9795 GO TO 1
 9800 REM -scroll right with wrap
 9805 DIM a$(704)
 9810 INPUT "Enter text: ";a$
 9815 FOR n=0 TO 32
 9820 PRINT AT 0,0;a$
 9825 FOR f=1 TO 673 STEP 32
 9830 LET a$(f TO f+31)=a$(f+31)+a$(f TO f+30)
 9835 NEXT f
 9840 NEXT n
 9850 GO TO 1
 9998 SAVE "SCROLLS" LINE 1
 9999 VERIFY ""
Scroll to Top