This program allows you to type a full screen (24 lines by 64 characters) on your TS2068. It’s primarily in BASIC, so it runs rather slow and will not keep up with most typists. COPYing the screen will print only every other character (the ones in display file 1), because the ROM routines do not support 64 column mode.
U$ holds the machine code to clear display file 2 and rearrange memory so that display file 2 can be used. Variables A-F get values 10-15 to assist in hexidecimal translation (because VAL(“A”)=10 if variable A equals 10).
Lines 90 and 95 establish characters for the normal cursor (wide vertical bar), inverse video cursor (narrow vertical bar) and caps locked cursor (inverse C). The cursor for inverse video caps locked is a normal C.
Variable DF contains the address of the current print position, and alternates from display file 1 to 2 and back. D (in line 25) counts through the 8 scan lines in each character as it prints. B is the print line number; C is the column number, and S is the starting address of the character set. I is the inverse video flag.
This program makes use of techniques explained in “Recipes for 2068 Advanced Video” (SYNTAX Feb’84). Further information appears in the TS2068 Technical Reference Manual (review in SYNTAX Jun’84) available from Timex.
5 REM BASIC 64-COLUMN TYPE
10 GO TO 40
15 REM PRINT CHARACTER
20 LET S=15616+8*(K-32)
25 FOR D=DF TO DF+1792 STEP 256
30 POKE D,ABS (I-PEEK S): LET S=S+1
35 NEXT D: RETURN
40 IF PEEK 23746=128 THEN GO TO 100
45 REM SET ENHANCED VIDEO
50 CLEAR 63205: LET U=63206
55 DATA 10,11,12,13,14,15
60 READ A,B,C,D,E,F
65 LET U$="*2100603600237CFE7820F8C9F33E01D3F4DBFFCBFFD3FF3E80F5FBCD8E0EF3DBFFCBBFD3FFAFD3F4F1FE80200332C25CFBC9"
70 FOR N=2 TO LEN U$-1 STEP 2
75 POKE U,16*VAL U$(N)+VAL U$(N+1)
80 LET U=U+1: NEXT N
85 RANDOMIZE USR 63218
90 FOR A=63256 TO 63263
95 POKE A,248: POKE (A+8),255-PEEK (A+16): POKE (A+16),255: NEXT A
100 ON ERR GO TO 9990
105 OUT 255,14
110 LET DF=16384: LET B=24: LET C=65: LET I=0
115 REM PRINT CURSOR
120 LET S=63256+8*(PEEK 23658=8): GO SUB 25
125 REM KEY
130 LET K=CODE INKEY$
135 IF K=0 THEN GO TO 130
140 REM SET/RESET CAPS LOCK
145 IF K=6 THEN POKE 23658,8*(PEEK 23658=0)
150 REM SET/RESET INVERSE VIDEO
155 IF K=5 THEN LET I=255
160 IF K=4 THEN LET I=0
165 REM DELETE?
170 IF K=12 THEN GO TO 250
175 REM CHARACTER?
180 IF K<32 OR K>122 THEN GO TO 115
185 REM PRINT
190 GO SUB 15: IF B=1 AND C=2 THEN GO TO 115
195 REM NEXT SPACE
200 LET DF=DF+8192*(DF<22528)-8191*(DF>24575)
205 LET C=C-1
210 IF C>1 THEN GO TO 115
215 IF C=1 THEN GO TO 230
220 LET B=B-1: LET C=64
225 GO TO 115
230 LET L=DF-256*INT (DF/256)
235 IF L<>0 THEN GO TO 115
240 LET DF=DF+1792
245 GO TO 115
250 REM DELETE
255 LET S=15616*(I=0)+63272*(I=255)
260 GO SUB 25
265 REM BACKSPACE
270 IF B=24 AND C=65 THEN GO TO 115
275 IF C<65 THEN GO TO 285
280 LET C=1: LET B=B+1
285 IF C>1 THEN GO TO 305
290 LET L=DF-256*INT (DF/256)
295 IF L<>0 THEN GO TO 305
300 LET DF=DF-1792
305 LET C=C+1
310 LET DF=DF-8192*(DF>24575)+8191*(DF<22528)
315 GO TO 115
9989 STOP
9990 OUT 255,128
9991 RANDOMIZE USR 63206
9992 ON ERR RESET
SYNTACTIC SUM: 36153, TS2068
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.