The 64 column utilities in the 2068 technical manual do work, but they are not easy to use from Basic. There are far too many things to remember, and debugging your programs is a nightmare. This program allows the use of they Basic PRINT command without having to rewrite the ROM.
It’s possible to intercept certain Basic commands, such as, PRINT and the attribute controls; FLASH, BRIGHT, INK and PAPER. Unfortunately, not all commands can be intercepted and some of the screen commands aren’t very effective in this mode. Since the attribute commands have almost no meaning in 64 columns, they have been redefined to do useful things.
How it Works
The program modifies the computer’s I/O channel #2 (for the screen) in RAM. Channel #1 (EDIT line) is not modified.
Certain actions by the computer will change channel specifications, causing general chaos on the screen. While a program is running, channel 2 is not modified and therefore operates reliably. When the program ends or is stopped by an error, the 64 column mode is switched off. This is done by modifying the machine stack so that another switching utility is run before the error message is displayed. This infringes on the “territory” of the ON ERROR command.
The built in error handling can be bypassed with RANDOMIZE USR 60016. When the program ends, you will still be in 64 column mode. If you’re careful, you can list short programs. Things will get very messy quickly thereafter. When ON ERROR is active, you will have complete control when the program ends. Without it, RANDOMIZE USR 60651 before stopping, in order to return to 32 column mode. It is also legal to switch between modes while the program is running by use of the two USR calls. Just don’t BREAK while you’re in 64 column mode.
Although the 64 column code is 694 bytes long, not all of the area above 60693 is vacant. The RAM resident code (see SWN 2/3), UDG’s and machine stack are all up there too. There is 1.5K of space up there for your expansion.
The Rules
RANDOMIZE USR 60000 gets you started.
Print works as before, and TAB and AT are now expanded to 64 columns. OVER and INVERSE work as before. UDG’s still work, but they may need some redefinition due to the change in character shape.
DRAW, CIRCLE, CLS and COPY cannot be intercepted and produce strange effects. They only work on the first display file.
The 2068 limits the screen attributes in 64 columns. FLASH & BRIGHT are not used. Only 8 combinations of INK & PAPER are allowed, and they must be the same for the whole screen. these commands have been redefined as follows:
INK — Selects both INK and PAPER. You pick the ink and the correct paper is automatically selected. Use it in a PRINT statement, e.g., PRINT INK 7.
PAPER — Now PAPER 1 or 0 will copy the screen to the 2040 printer. Do not use it in a PRINT command.
FLASH — FLASH 1 or 0 will clear the 64 column screen. Do not use it in a PRINT command.
BRIGHT — BRIGHT 1 now bolds the text (similar to Fat Characters), which will make TV 64 column viewing easier. BRIGHT 0 will return characters to their normal size. The modes can be mixed on the screen. E.G., PRINT BRIGHT 1.
Scrolling is particularly troublesome and is not implemented here. A full screen causes an “out of screen” error similar to the TS1000. Characters in the edit line print in every other column. 64 columns in the edit line is not reliable. Finally, it would be best not to use ON ERROR until you fully understand the system.
I do hope you enjoy using this program as much as I enjoyed developing it.
64 Column Machine Code
Enter this Basic listing and RUN it to incorporate the 64 column machine code. Then NEW the computer and type in the 64 column DEMO or write one yourself which makes use of 64 columns.
1 REM 64 column code by Wes Brzozowski
10 DATA 042,061,092,078,035,070,237,067,017,237,001,220,236,112,043,113,062,128,211,255,062,001,211,244,062,006,205,142,014,175,211,244,219,255,203,191,211,255,000,042,079,092,001,191,234,035,035,035,035,035,113,035,112,175,050,000,064,001,255,023,017,001,064,033,000,064,237,176,050,000,096,001,255,023,017,001,096,033,000,096,237,176,033,065,024,034,136,092,033,000,064,034,132,092,201,205,026,006,254,032
20 DATA 210,127,235,254,006,056,091,254,024,048,087,033,207,234,195,030,005,065,080,016,035,077,076,075,049,073,072,090,089,088,087,086,085,078,077,012,062,066,185,032,011,004,014,002,062,025,184,032,003,005,014,065,195,044,236,058,145,092,245,253,054,057,001,062,032,205,172,235,241,050,145,092,201,014,065,205,030,236,005,195,044,236,205,026,006,121,061,061,230,048,214,064,237,068,230,048,024,079,062,063
30 DATA 024,085,017,063,235,050,015,092,195,151,005,017,042,235,195,148,005,017,063,235,195,148,005,017,191,234,205,151,005,042,014,092,087,125,254,022,218,078,236,032,035,068,074,062,063,145,056,006,198,002,079,062,022,144,218,041,031,060,071,004,253,203,002,070,194,030,236,253,190,049,218,193,007,195,044,236,124,205,026,006,129,061,230,063,195,225,005,205,133,235,195,249,005,254,128,056,035,254,144,048
40 DATA 012,071,205,109,006,205,026,006,017,146,092,024,045,214,165,048,009,198,021,197,237,075,123,092,024,011,205,069,007,195,026,006,197,237,075,054,092,235,033,059,092,203,134,254,032,032,002,203,198,038,000,111,041,041,041,009,193,235,121,061,062,065,032,002,005,079,185,213,204,030,236,209,197,229,058,145,092,006,255,031,056,001,004,031,031,159,079,062,008,167,235,008,026,160,245,197,070,058,012,237
50 DATA 167,040,009,120,203,039,176,050,013,237,024,004,120,050,013,237,193,241,229,033,013,237,174,225,169,018,008,020,035,061,032,215,235,225,193,013,203,108,040,001,035,062,032,172,103,201,017,044,236,213,120,253,190,049,218,193,007,192,207,004,120,253,203,002,070,040,005,253,134,049,214,024,197,071,205,214,009,193,062,065,145,203,071,040,004,017,000,032,025,203,063,195,050,009,254,016,040,018,254,017
60 DATA 040,037,254,018,202,149,234,254,019,040,020,254,020,195,201,035,122,230,007,007,007,007,071,219,255,230,199,176,211,255,201,000,122,230,001,050,012,237,201,243,237,075,014,237,197,062,000,050,016,237,205,148,236,193,062,016,050,016,237,205,148,236,251,201,205,189,236,017,000,091,205,171,236,033,000,091,197,000,000,205,074,010,193,012,016,234,201,197,006,016,126,018,019,203,236,126,018,019,203,172
70 DATA 035,016,243,193,201,121,230,007,103,121,203,063,203,063,203,063,230,024,180,246,064,103,058,016,237,111,121,203,039,203,039,230,224,181,111,201,205,235,236,042,061,092,237,091,017,237,115,035,114,235,233,062,128,211,255,062,001,211,244,062,000,205,142,014,175,211,244,211,255,042,079,092,001,000,005,035,035,035,035,035,113,035,112,201,000,000,000,192,016,141,014,001,000,000,000,000,000,000,000,000
1000 CLEAR 59999: LET x=60000
1010 FOR j=10 TO 70 STEP 10: RESTORE j: FOR i=1 TO 100: READ a: POKE x,a: LET x=x+1: NEXT i: NEXT j:
2000 SAVE "64colbas" LINE 1000
64 Column Basic Demo
10 CLEAR 59999
20 LOAD ""CODE
30 PAPER 2: CLS
40 PRINT AT 10,8;"64 Column BASIC"
50 PRINT AT 12,7;"By Wes Brzozowski": PRINT AT 12,8;"[address omitted]": PRINT AT 12,9;"Endicott. NY 13760"
70 PRINT #1;" Press N for NEW or D for a little demonstration"
80 IF INKEY$="n" OR INKEY$="N" THEN NEW
90 IF INKEY$="d" OR INKEY$="D" THEN GO TO 1000
100 GO TO 80
1000 PAPER 7: CLS : RANDOMIZE USR 60000
1010 PRINT BRIGHT 0;"This is an example of 64 column printing!!!!!!!!!!!!!!!!!!!!!!!!!"
1020 PRINT : PRINT BRIGHT 1;"...........And Here's a darker version"; BRIGHT 0
1030 PRINT : PRINT "You can use either one, depending on the clarity of your TV set"
1040 PRINT : PRINT "...Or, you can use "; BRIGHT 1;"both"; BRIGHT 0;" in order to highlight "; BRIGHT 1;"some important point"; BRIGHT 0
1050 PRINT : PRINT "You can use the graphic characters...▒▒▒▒▒▒▒▒▒"
1060 PRINT : PRINT INVERSE 1;"...Or inverted characters"; INVERSE 0
1070 PRINT : PRINT "And you do it all with BASIC commands!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
1080 PRINT : PRINT "AT and TAB still work, but now you can extend them to 64 columns"
1090 PRINT : PRINT "The user defined graphics work too, but not too clearly."
1100 PRINT : PRINT "If you have a TS2040 printer, turn it on. In any case, press a key to continue"
1110 PAUSE 4e4: PAPER 1
1120 FLASH 1: PRINT "If you're trying to figure out what just happened, the printer first printed the left hand side of the screen, and then the right side. The alternative, (printing sideways) could just as easily have been done, but it uses up 1/3 more paper. Using scissors and glue is a bit bothersome, but not overly much. I hope you'll agree."
1130 PRINT BRIGHT 1;AT 8,9;"The 64 column mode is limited by the hardware"
1140 PRINT AT 9,9;"to only 8 combinations of ink/paper, and only"
1150 PRINT AT 10,9;"a couple of those are readable. Press a key"
1160 PRINT AT 11,9;"to see all eight combinations............"
1170 PAUSE 4e4
1180 FOR j=1 TO 8: INK (8-j): PAUSE 60: NEXT j
1190 PRINT : PRINT "And now, if you'll press another key, I'll return you to the 32 column mode. Go ahead..list the program and look at the almost-normal BASIC commands used. Now change it around, and see what happens. Re-enter with GOTO 40."
1200 PRINT : PRINT " ***** HAVE FUN!!!!!!!! *****"
1210 PAUSE 4e4
1220 BRIGHT 0: FLASH 1: STOP
9000 STOP
9900 OUT 244,1: MOVE "wes64col.bas",10: MOVE "64code.bin",60000,800: OUT 244,0: STOP
9901 REM aerco disc save
9999 SAVE CHR$ 18+CHR$ 1+"64cols"+CHR$ 18+CHR$ 0 LINE 10: BEEP .1,1: SAVE CHR$ 18+CHR$ 1+"code!!"+CHR$ 18+CHR$ 1CODE 60000,800
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.