Occasionally I have a need to print text in 64 column format. Most print methods in common use resort to either setting-up the 64 column mode (using machine code + OUT 255,6), using the Taswide utility, or using the OS-64 cartridge.
The following bit of machine code will allow you to print any text string using a clean, fast 64 column character set. What distinguishes this program from similar ones is that instead of requiring 768 bytes to define the characters (96 characters X 8 bytes per character), this program uses half the usual number of bytes to define the character set.
Each eight byte character holds the bit pattern for two characters; one on the left and one on the right side of each eight byte character. Whenever a 64 column character is to be printed, the machine code determines if the character is on the left or right side of the byte, parses it, and prints only bits 0 to 3 or bits 4 to 7.
Study the demo given in lines 1 to 30. There are several rules to follow when using this utility in your programs.
The first line of your program must DIMension S$ to the maximum number of characters that you plan to print at any one time, plus 3. See line 1. When you are ready to print 64 column text, write a BASIC line that lets S$=”Your text”. The first quote should be preceeded by CHR$ column # + CHR$ line # +.
After the last quote you should add: + CHR$ 255 to tell the program to end 64 column printing. See lines 10 and 20 for an example.
RANDOMIZE USR 65250 does the printing.
The line and column numbers tell where you want the printing to start. The values for “line” are 0 to 23, and “column” values can be from 0 to 31. Text will wrap around to the left if the text extends beyond the 64th column.
Define S$ as many times as you wish in your programs but remember that the DIM S$(?) should be 3 + the largest number of characters you want to print at any one time.
This program is not relocatable as written. Be sure to run line 9800 first to poke in the code. The checksum will let you know if you made any typing errors. The code is 557 bytes long.
Reprints:
Source Code
1 DIM S$(67)
5 FOR N=0 TO 23
10 LET line=N: LET column=0
20 LET S$=CHR$ column+CHR$ line+"ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-1234567890"+CHR$ 255: RANDOMIZE USR 65250
30 NEXT N: PAUSE 0: STOP
9800 CLEAR 64862: LET t=0
9810 FOR n=64863 TO 65419
9820 READ a: POKE n,a: LET t=t+a
9830 NEXT n: IF t<>39831 THEN PRINT "Data Error! Recheck DATA lines": STOP
9840 RUN
9850 DATA 0,0,0,0,2,2,2,2,0,2,0,0,80,85,7,5,7,5,0,0,44,125,98,52,123,35,0,0,98,162,64,176,160,208,0,0,34,65,65,65,65,34,0,0,0,82,34,119,34,82,0,0,0
9860 DATA 0,0,7,0,32,64,0,1,1,2,2,4,36,0,0,54,82,82,82,82,98,0,0,39,81,18,33,65,118,0,0,71,84,86,113,17,22,0,0,55,65,97,82,84,36,0,0,50,85,37,83,81,102,0,0,0,0,34,0,34,4,0,0,0,16,39,64,39,16,0,0,2,69,33,18,32,66,0,0,98,213,213,183,133,117,0,0,99,84,100,84,84,99,0,0,103,84,86,84,84
9870 DATA 103,0,0,115,68,100,69,69,67,0,0,87,82,114,82,82,87,0,0,21,21,22,21,21,101,0,0,69,71,71,69,69,117,0,0,98,85,85,85,85,82,0,0,98,85,85,101,71,67,0,0,99,84,82,97,81,86,0,0,117,37,37,37,37,35,0,0,85,85,85,87,87,37,0,0,85,85,37,34,82,82,0,0,118,20,36,36,68,118,0,0,67,65,33,33,17,19,0,0,32
9880 DATA 112,32,32,32,32,15,0,48,70,97,39,69,119,0,0,64,99,84,84,84,99,0,0,16,50,85,87,84,51,0,0,16,35,117,37,37,35,6,0,66,96,82,82,82,81,0,0,36,5,38,38,37,37,64,0,32,37,39,39,37,21,0,0,0,98,85,85,85,82,0,0,0,99,85,85,85,99,65,0,0,51,68,66,65,70,0,0,32,117,37,37,37,19,0,0,0,85,85,87,87
9890 DATA 37,0,0,0,85,85,37,85,83,6,1,2,114,20,34,66,113,0,4,34,34,33,34,34,36,0,6,89,175,13,15,9,6,0,42,75,92,126,254,211,192,1,6,0,9,237,91,95,253,213,58,97,253,245,203,255,50,97,253,94,35,86,35,122,230,7,15,15,15,131,95,122,230,248,246,64,87,229,225,126,35,229,254,255,32,11,225,241,50,97,253,209,237,83,95,253,201,205,38,255
9900 DATA 24,232,213,6,8,79,33,98,253,22,0,214,32,95,203,59,235,41,41,41,25,209,213,203,65,32,5,126,230,240,24,9,126,203,39,203,39,203,39,203,39,245,58,97,253,203,71,32,6,26,230,15,18,24,14,241,203,63,203,63,203,63,203,63,245,26,230,240,18,241,235,182,119,235,35,20,16,201,209,58,97,253,203,71,32,7,60,230,129,50,97,253,201,28,237,83,95,253,230,128,50,97,253,201