Personal Computer News


Beeb Screen Scroll In Three Modes

Categories: Letter

 
Author: Jonathan Temple
Published in Personal Computer News #106

Beeb Screen Scroll In Three Modes

The following routine scrolls the BBC's Mode 2/1/0 screens up or down. The routine is activated with call PROCSCR(T%,G%) where T% is the number of times the screen is to be scrolled, and F% is the direction, -1 for down, 1 for up.

10 MODE 2
20 PRINT"UP/DOWN SCROLL..."
30 FOR T=0 TO 10:GCOL 0,RND(7)
40 PLOT 85,RND(1280),RND(1024):NEXT
50 PROCSCR(65,-1)
60 PROCSCR(65,1)
70 END
1000 DEFPROCSCR(T%,F%)
1010 L%=&1000:H%=&600
1020 IF F%=-1 THEN L%=H%:H%=&1000
1030 S%=H%:FOR N%=1 TO T%:*FX 19
1040 ?&FE00=12:?&FE01=S% DIV 256
1050 ?&FE00=13:?&FE01=S% MOD 256
1060 S%=S%+F%*&50:IF S%=L% THEN S%=H%
1070 NEXT
1080 ENDPROC

Jonathan Temple, Beeston, Nottingham

Jonathan Temple