> LM=3 RM=77 TM=1 BM=80 PL=80FONTASY ON A MODEL 4 & MODEL 1 or DOT WRITER FONTS DECODED.-----------------------------------------------------------     I have used the old GEAP and TINY GEAP Programs for a while and always wanted to use the DOT WRITER FONTS as GEAP does with Medium Large & Cube Leters.ie Typed in any where on the screen.     With this in mind I looked at Dot Writer FONTS to see how they worked, in conjunction with the Basic version of Tiny Geap.     I have also looked at using Laurie Shields program of Screen Dumping, this was originally written in one of the earlier issues of this Mag for Model 1.     The result is I have written a program to dump Dot writter fonts onto the Screen, save the screen to disc, to be later used if required from Basic for more interesting screen displays. This will work in Md 1, Md 4 in Md 3 Mode and Md 4 under TRS 6.     Further I have added High Res graphics under GBasic, this latter works closest to FONTASY, & can be printed with a screen dump. Further additions allow full movement of font chars or groups of characters around the screen.     By using DDUTY, I can put GBASIC's Draw program in one side, my programme in the other. Then both can be swapped around to produce a very effective drawing & graphics program in High Res.                                                                                                        DOT WRITER FONTS DECODED.                         -------------------------     The Font is written as one continuous piece. The first 4 Bytes are the most important ones. They indicate the length of each font charactor, number of bytes needed to make the charactor, and the number of vertical lines of the charactor.eg. 1C 00 0E 00  1C gives 28 chars to make Char.                 0E gives 14 chars wide for Char.                 1C / 0E gives 2 lines for Char.     There are some further information bytes on some fonts ending in 60. These I have not dealt with as are used by DOT WRITER to indicate information as 'No lower case'.     The FONT is then made up of 28 byte divisions, but have no markers at     all.The first div contains the information as above then the chars follow. ! to z in order if the font is long enough to contain all the chars.Dot Writer or Tiny Geap calculate the position in the file of the char and loads into memory the 256 bytes which includes the char.Each char represents 8 vertical dots, each bit of a byte indicates if the dot is set or not.The char is scanned left to right, then starts again 1 line down.Tiny Geap on input of char required calcs the record no. to bring into the buffer,loads it, then by varptr of buffer reads in the calculated start of the char, if the char goes into the next record it will bring that in.Each byte is then printed to screen or paper.     Tiny geap uses many USR calls & I have not decoded them, so I wrote all in Basic.     The program works well but not quite as fast as Fontasy, but for program developement, ie Screen Formatting using font chars is quite adequate.Programs in practice.TRS 6 basic has no Set & Reset calls, but an additional Machine code program from 80 Micro is used to give these functions.     Since no drawing program is around for TRS 6, I wrote one to add geap type drawing using arrows & Keypad to move cursur.     This whole program was adapted for GBasic and high res adding a few high res commands like save, load and print.     The program has also been adapted for Md 1.     In High Res the Chars are small as are the set points.     In low res a char can fill half the screen, but by chosing the right fonts an enhanced Screen can be produced; adding in drawing to produce boxes etc.     Using L.Shields Screen Dumping program a fast and impressive screen ie. Menu or Display can be produced from Basic.     The Screen Program in the original form was in an earlier Mag. An enhanced version working under 2k of screen memory and TRS 6 basic is now avialable     This enables a screen formed from Fonts to be saved to disk as a file of many screens, these can be loaded into Memdisk for fast access.     I use the original screen program to load 6 @ 1K screens from memory to screen:- Menues & Data inputing screens. These screens also give a very fast screen refresh.THE PROGRAM ITSELF------------------Below is a listing of the Font Print out part.3500 CLS:CLOSE1:ONERROR GOTO45003505 PRINT "NORMAL OR REVERSE" ' Reverse Chars can be printed3506 Z$=INKEY$:IF Z$=""THEN 35063507 IF Z$="R" OR Z$="r"THEN R%=0 ELSER%=13510 CLS:PRINT"HIT KEYBOARD SYMBOL FOR FIGURE: ";3520 A$=INKEY$:IFA$=""THEN3520 ELSEI=ASC(A$)3530 PRINTA$:IFI<33 THENI=I+643540 IC=I-323550 PRINT"ENTER LETTERSET FILE NAME (0 TO CANCEL): ":IF D1$<>"" THEN PRINT "<ENTER> ALONE FOR ";D1$3560 LINE INPUT A$:IFA$="0" THENGOSUB310:RETURN3570 IFA$=""AND D1$<>"" THENA$=D1$3575 CLS:IFYY%THENGOSUB3103580 D1$=A$:OPEN "I",1,A$:CLOSE1:OPEN "R",1,A$3590 GET 1:FIELD 1,2 AS B$,2 AS C$3600 W%=CVI(C$):IFW%=0THENPRINT"FILE;A$;" NOT FORMATED CORRECTLY !";FOR I=0TO4000:NEXT:RETURN ' W% = No. of Bytes to Font Char.3610 Q%=CVI(B$):M%=Q%/W%:I=VARPTR(B$):H=PEEK(I+1)+256*PEEK(I+2)3620 IC=IC*W%*M%:NR=IC/256+1:NB=IC AND255 ' Q% = Width of Char3621 IF R%=0 THEN FORXX=X1% TO X1%+W%-1:FORZZ=Z1%TOZ1%+M%*8-1:SET(XX,ZZ):NEXTZZ:NEXTXX3630 X0=H+NB:L%=1:MM%=0:M1%=1 ' M%,M1% refer to Height of Char in lines3650 GET 1,NR:GOSUB 3800:NR=NR+1:X0=H:IFL% THEN 3650 ' NR = rec No.3660 CLOSE1:Y=R3%:X=C1%+W%+2:RETURN 'These set cursur for return to display.3800 'X0 is varptr calc position of char in buffer.3900 X%=PEEK(X0) ' Byte to be acted on for screen print4000 IF R%=0 THEN 4300  ' Reverse char Mode4010 IFX%AND128THENSET(X1%,Z1%) ' Printing to screen bits of byte4020 IFX%AND64THENSET(X1%,Z1%+1)4030 IFX%AND32THENSET(X1%,Z1%+2)4040 IFX%AND16THENSET(X1%,Z1%+3)4050 IFX%AND8THENSET(X1%,Z1%+4)4060 IFX%AND4THENSET(X1%,Z1%+5)4070 IFX%AND2THENSET(X1%,Z1%+6)4080 IFX%AND1THENSET(X1%,Z1%+7)4230 MM%=MM%+1:X0=X0+1:IFMM%=Q%THENL%=0:RETURN4232 IFX0-H=256ANDMM%-(W%*M1%)=0THENM1%=M1%+1:Z1%=Z1%+8:X1%=X1%-W%+1:RETURN ELSEIFX0-H=256THENX1%=X1%+1:RETURN4235 IFMM%-(W%*M1%)=0THENM1%=M1%+1:Z1%=Z1%+8:X1%=X1%-W%+1:GOTO39004239 X1%=X1%+1:GOTO3900 ' above calcs end of line, end of FONT char, end of buffer so next record.4300 IFX%AND128THENRESET(X1%,Z1%) ' Reverse printing of bits.4310 IFX%AND64THENRESET(X1%,Z1%+1)4320 IFX%AND32THENRESET(X1%,Z1%+2)4330 IFX%AND16THENRESET(X1%,Z1%+3)4340 IFX%AND8THENRESET(X1%,Z1%+4)4350 IFX%AND4THENRESET(X1%,Z1%+5)4360 IFX%AND2THENRESET(X1%,Z1%+6)4370 IFX%AND1THENRESET(X1%,Z1%+7)4380 GOTO42304500 CLOSE1:CLS:PRINT"DISK ERROR ";ERRS$;:FORR=1TO4000:NEXT:RESUME 45104510 ONERROR GOTO04520 GOSUB 310:GOTO1250 ' 310 is screen Zap from stored memory to screen     The program works by a Keyboard entry of "T" which stores into memory the present screen, notes position of cursur and goes into above routine.The Char is printed from cursur point.Looking at 8 vertical pixels at a time, scanning across the droping one line (8 Pixels), the printing next line, until end of char. The cursur then is moved to 1 pixel past printed char and ready for next entry     The reverse mode is carried out by printing a white background & resetting instead of setting     This was found best since this is how Md 4 works with its reverse mode, if you print a char the computer exclusive or's the background to print white if background is black & visa versa.This is quicker as only the pixels required to be printed on are printed.     The Hi-Res mode in Md 4 works very similar, but the screen handling is easier as it does not need to be saved to memory since the Hi-Res screen uses its own dedicated memory. Saving & loading of screens are done using Gbasic commands. Printing of screens is carried out in the same way.THE REST OF THE PROGRAM-----------------------     A Main Menu lets you Save, Store Screens to a disk file. Load Geap Screens,(In Mod 4 Mode allows offset since Geap is only a 1K Screen.     The Screen Edit Mode allows Keyboard chars be entered on screen.     Goto Font Mode. The sub menu is as below. Instructions are available.'W' allows cursur movement to write to screen.'E'   "      "       "        erase      "'Q'   "    qursur    "    without erase or write'C' Clears screen'S' Brings in saved screen from memory'T' Loads in FONT Char'@' Ends this mode storing screen to memory & returns to main menu.Goto High Res Mode.Key Board movement of cursur is as above with the addition of'S' Now loads sub menu.1. Load Screen from Disk2. Save Screen to Disk3. Print Screen 4. Enter Standard Print Mode (Allows KeyBoard Chars be printed on Hi-Res Screen, NB Space is true delete)5. Enter Reverse Print Mode (As 4 but reverse chars.)6. Change Mode (Changes screen mode so cursur is larger)7. Move Block about. (Set Beginning marker with 'B' , set end marker with 'E', acts like box command, ie use diagonals of Block required. Arrow keys move the block around as required.)8. Insert Block.  (If you return to main mode CTRL 'R': Move cursor to new position, Press 'S' to sub menu.'8' Then allows a Block set by '7' to be placed at the new cursor position, and moved around main mode is returned to.9. Return.   (Return to main mode)     I am sure there is more that could be added to this program, also there are errors and modifications necessary, but I have used it together with Gbasic's draw program to print out simple electrical drawings,flow drawings & large labels using Font Characters with little trouble.     This program is avialable from the MOD 4 library, complete with L.Shields part. For any further information I should be glad to help.Brian Edwards.  9 Wayground Road, Corfe Mullen, Wimborne, DORSET.BH21 3ED.                                                                                