TS 2068 Programming

See all articles from Sinc-Link v2 n6
Author(s): John Roach
Publication: Sinc-Link
Pub Details: Sinc-Link v2 n6 (Volume 2, Issue 6)
Date: November 1984
Pages: 9

Recognizing UDG’s

As you know from the manual, there are 21 User Defineable Graphic characters which can be assigned from CODE 144 to CODE 164. To show what you are doing and to keep program LISTing as clear as possible, it’s best to use the CHR$ function rather than shifting to the Graphics mode.

10 PRINT CHR$ 144; CHR$ 145; CHR$ 146

It’s instantly recognizable as UDG’s.

UDG Loader

This routine is not in the manual but it saves a lot of typing time not using all the BIN values.

9000 FOR g=144 TO 164          (or less)
9010 FOR n=0 TO 7
9020 READ a : POKE USR CHR$ q + n,a
9030 NEXT n
9040 RESTORE : RETURN
9050 DATA................

Each data statement contains 8 numbers per line; each number is the decimal value for the binary bits in UDG character row. Each data statement defines one character.

Fancy Titles

Assign a string to T$ less than or equal to 32 characters for the title and a value to the variable “pa” less than 22 for PRINT AT line number:

10 LET T$ = "HERE IS A PROGRAM TITLE"
20 LET pa = 10
30 GOSUB 100
40 STOP

100 LET M = LEN T$ : IF M/2 < > INT (M/2) THEN LET T$ = T$ + " " : LET M = M +1
110 FOR N = 1 TO M/2 : PRINT AT pa, 16-N; T$ ( TO N); T$ (M - N + TO ): BEEP .02,2 * N : NEXT N : RETURN

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