A short demonstration of calling TS2068 ROM display routines from machine code. The program builds two tiny machine-code stubs at 60000 from DATA (a DEF FN pair splits each ROM address into bytes): one clears a given number of rows at the bottom of the screen through the ROM routine at 2431, the other scrolls them up one row through the routine at 2363.
It fills the screen with numbered rows, writes in the lower screen, prints POOF! and wipes the bottom half, then keeps scrolling random numbers up the bottom of the screen. The article gives the matching Spectrum ROM addresses for each routine.
Published in Sinc-Link January-February 1986 (PLOT, CLS and SCROLL on the TS2068).
Source Code
1 GOTO 100
10 DEF FN H(x)= INT(x/256): DEF FN L(x)=X-256*FN H(x)
20 RESTORE
30 READ byte : IF byte <> PI THEN POKE address, byte : LET address = address + 1 : GOTO 30
40 RETURN
50 DATA 6, n, 205, FN L (romaddr), FN H (romaddr), 201, PI
100 LET address = 60000 : LET n = 12
110 LET clsbottom = address : LET romaddr = 2431 : GOSUB 20
120 LET scroll = address : LET romaddr = 2363 : LET n=n-1 : GOSUB 20
200 FOR r = 0 TO 21 : PRINT "row ";r: NEXT r
210 FOR r = 0 TO 1 : PRINT # 1; AT r, 0; "lower row ";r: NEXT r
220 PAUSE 200
230 PRINT AT 12, 10; "POOF !" : PAUSE 20: RANDOMIZE USR clsbottom
240 PRINT #1; AT 1, 0; RND
250 PAUSE 20 : IF USR scroll THEN GOTO 240Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

