16 Point Font Designer is an editor for large, 16-pixel-high character sets. The main screen holds a magnified editing grid, an “Actual Size” preview with the current character code, and the full character set. The cursor works in MOVE, DRAW or ERASE mode. Pull-down FILES, FUNCTIONS and OPTIONS menus load 8-point or 16-point fonts, save 16-point fonts, copy the screen to a 2040 or a full-size printer, and edit the current character or the whole font.
The program reads “16 Pt. Font Designer — Lemke Software 1988”. Lemke Software Development’s advertisement and instructions are archived as a separate document. The program was reviewed in The Sinclair Desktop Publishing Journal (“16 Point Font Patrol”) and announced with the 16 Point Font Pack.
Program Analysis
Structure
A short BASIC program starts at line 9000: CLEAR 29999, then it loads the 12,225-byte code file at 30000 and calls RANDOMIZE USR 30000. Lines 9010–9030 define two UDGs (an arrow and a box). Most of the editor is machine code, which the BASIC lines call at various entry points (31500, 31521, 31622, 32118, 32139, 37415). The BASIC handles file names: an 8-point font loads at 59500, and a 16-point font loads or saves as a 1,537-byte block at 57900. Error subroutines at 8000–8010 reject a name that is too long or too short.
Menus
The menu text in the code lists COPYRIGHT, SAVE PROGRAM, SET COLORS and QUIT; LOAD 8 PT., LOAD 16 PT., SAVE 16 PT., COPY SCREEN$, SET PRINTER and TAPE/DISK; and the character functions NEW CHR$, CLR CHR$, KEEP, RESTORE, PUT CHR$, INVERSE, CLR FONT, INV FONT, SHIFT (left, down, up, right), WRAP, CLICK and SPEED. Line 820 is a REM telling the user to put the call to their full-size printer’s COPY routine there.
Tape or disk
The BASIC reads PEEK 42287 to decide between tape and disk. On tape it uses plain LOAD/SAVE ... CODE. The disk branch uses CAT "a:" and MOVE "name.BIN" syntax for a different disk system, and it is skipped when the flag is 0, as it is after loading from tape.
Notable Techniques
- Machine-code editor driven by a small BASIC shell that handles file names and tape I/O.
- The code contains a routine that reads the TS2068 joystick port through the AY chip’s I/O register.
- Printer output through either the TS2040 or a user-supplied full-size printer COPY routine.
Potential Issues
- The cursor and the pull-down menus appear to need the TS2068 joystick: in testing, the mode keys M, D and E responded but the cursor did not move from the keyboard.
This copy came from a Larken disk and was converted for tape: the RANDOMIZE USR 100 disk prefixes and the LOGICALL line were removed, and the tape auto-runs from line 9000 as the original did. A sample 8-point font from the same disk (Chancery) is added at the end of the tape under the name chancery for trying LOAD 8 PT. It was tested in ZEsarUX, where it loads and runs to the editor screen.
Source Code
5 PAPER 7: INK 0: BORDER 7: CLS
10 RANDOMIZE USR 37415
820 REM Edit this line to RND USR your Full Size Printer COPY routine, for example RANDOMIZE USR 64000
830 RANDOMIZE USR 31500
910 LET io=PEEK 42287: LET t=0
920 INPUT #0;AT 0,0;" LOAD 8 Point Font..... Font Name? "; LINE a$
930 IF io THEN GO TO 960
940 IF LEN a$>10 THEN BEEP .01,30: GO SUB 8000: GO TO 920
950 GO SUB 8100: LOAD a$CODE 59500: GO SUB 8300: RANDOMIZE USR 31521
960 GO SUB 8200: IF t=2 THEN GO TO 10
970 IF t=1 THEN GO TO 920
980 GO SUB 8100: LET a$=a$+".BIN"",59500": CAT "a$",: GO SUB 8300: RANDOMIZE USR 31521
1010 LET io=PEEK 42287: LET t=0
1020 INPUT #0;AT 0,0;" LOAD 16 Point Font..... Font Name? "; LINE a$
1030 IF io THEN GO TO 1060
1040 IF LEN a$>10 THEN BEEP .01,30: GO SUB 8000: GO TO 1020
1050 GO SUB 8100: LOAD a$CODE 57900: GO SUB 8300: RANDOMIZE USR 31622
1060 GO SUB 8200: IF t=2 THEN GO TO 10
1070 IF t=1 THEN GO TO 1020
1080 GO SUB 8100: LET a$=a$+".BIN"",57900": CAT "a$",: GO SUB 8300: RANDOMIZE USR 31622
1110 LET io=PEEK 42287: LET t=0
1120 INPUT #0;AT 0,0;" SAVE 16 Point Font..... Font Name? "; LINE a$: BEEP .01,30
1130 IF io THEN GO TO 1160
1140 IF LEN a$>10 THEN BEEP .01,30: GO SUB 8000: GO TO 1120
1145 IF LEN a$=0 THEN BEEP .01,30: GO SUB 8010: GO TO 1120
1150 GO SUB 8100: SAVE a$CODE 57900,1537: GO SUB 8300: RANDOMIZE USR 32118
1160 GO SUB 8200: IF t=2 THEN GO TO 10
1170 IF t=1 THEN GO TO 1120
1180 GO SUB 8100: LET a$=a$+".BIN"",57900,1537": MOVE "a$",: GO SUB 8300: RANDOMIZE USR 32118
1210 LET io=PEEK 42287
1220 IF io THEN MOVE "FONT_16.BAS",9000: MOVE "FONT_16.BIN",30000,12225: RANDOMIZE USR 32139
1230 SAVE "FONT_16" LINE 9000: SAVE "FONT_16"CODE 30000,12225: RANDOMIZE USR 32139
8000 PRINT #0;AT 0,0;"ERROR.... the File name was too long! Please try again! ": PAUSE 200: GO SUB 8300: RETURN
8010 PRINT #0;AT 0,0;"ERROR.... the File name was too short! Please try again! ": PAUSE 200: GO SUB 8300: RETURN
8100 PRINT #0;AT 0,0;"If a LOAD/SAVE ERROR occurs... type: GOTO 5 (ENTER) ": RETURN
8200 IF LEN a$=0 AND t=1 THEN LET t=2: RETURN
8205 IF LEN a$=0 THEN CAT "",: LET t=t+1: RETURN
8210 IF LEN a$=2 THEN IF (a$(1)="A" OR a$(1)="a") AND a$(2)=":" THEN CAT "a:",: LET t=1: RETURN
8220 IF LEN a$=2 THEN IF (a$(1)="B" OR a$(1)="b") AND a$(2)=":" THEN CAT "b:",: LET t=1: RETURN
8230 LET t=5: RETURN
8300 PRINT #0;AT 0,0;TAB 31;" ";TAB 31;" ": RETURN
9000 CLEAR 29999: RANDOMIZE USR 100: LOAD "font16.C1"CODE 3E4: RANDOMIZE USR 3E4
9010 DATA 0,16,32,127,127,32,16,0
9020 DATA 255,129,129,129,129,129,129,255
9030 FOR i=0 TO 15: READ j: POKE USR "A"+i,j: NEXT i
9040 GO TO 5
9989 STOP
9992 RANDOMIZE USR 100: SAVE "FONT16.B1" LINE 9E3: RANDOMIZE USR 100: SAVE "font16.C1"CODE 3e4,12225
9998 RANDOMIZE USR 100: LOAD "L.B1"Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
