Scroll

Publication: ZX-Appeal
Date: September 1986
Pages: 14

Here’s an oldie that first graced our pages back in the spring of ’83, originating in Sinclair Programs Jan/Feb ’83.

SCROLL is a machine code program to move the display across the screen in any one of eight directions. Enter Listing 1, keying 126 characters in the REM statement in line 1. The variables S1 to S9 correspond to the compass points NW, N, NE, W, E, SW, S and SE. RUN the program and the machine code will be POKEd into the REM statement. Then delete lines 10 to 70 and replace then with the demonstration routine in Listing 2. If the direct command “GOTO 10” is then entered, the versatility of this scroll program will be demonstrated. Submitted by Stephane Crainic, of Paris. [16K ZX-81]

LISTING 1

  1 REM 111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999000000000011111111112222222222333333
2 LET S1=16626
3 LET S2=16514
4 LET S3=16633
5 LET S4=16560
6 LET S6=16588
7 LET S7=16619
8 LET S8=16529
9 LET S9=16612
10 LET A$="2A0C40E511210019D101D602EDB0C92A1040114300ED52E5112100ED52D101B502EDB82A0C40062023360010FBC92A0C4011D6021906162B4E36002B7EFE762802180310F2C9714F18F12A0C400616234E3600237EFE762802180310F2C9714F18F1CDCC40CD9140C9CDB040CD9140C9CDB040CD8240C9CDCC40CD8240C9"
19 FAST
20 LET I=16514
30 FOR J=1 TO LEN A$ STEP 2
40 POKE I,(CODE A$(J)-28)*16+CODE A$(J+1)-28
50 LET I=I+1
55 IF PEEK I=118 THEN GOTO 70
60 NEXT J
70 SLOW

LISTING 2

 10 LET A$="S0"
20 LET A$(2)=STR$ (VAL A$(2)+1)
30 IF A$(2)="5" THEN GOTO 20
40 FOR I=1 TO 22
50 PRINT "===SINCLAIR USER AND PROGRAMS==="
60 NEXT I
70 FOR I=1 TO 32
80 RAND USR VAL A$
90 NEXT I
100 CLS
110 GOTO 20

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.