--- title: "64 Column BASIC" type: "article" slug: "2068-64-column-basic" url: "http://localhost/article/2068-64-column-basic/" markdown_url: "http://localhost/article/2068-64-column-basic.md" published_at: "2022-05-30T05:52:29+00:00" modified_at: "2026-06-29T00:09:28+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "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 the Basic PRINT command without having to rewrite the ROM. It's possible to intercept…" category: - name: "SyncWare News" slug: "syncware-news" taxonomy: "category" url: "http://localhost/category/periodicals/syncware-news/" post_tag: - name: "Best of Timex/Sinclair 2068 Articles and Documents" slug: "ts2068best" taxonomy: "post_tag" url: "http://localhost/tag/ts2068best/" - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "Machine language programming" slug: "machine-language" taxonomy: "post_tag" url: "http://localhost/tag/machine-language/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Wes Brzozowski" slug: "wes-brzozowski" taxonomy: "indiv" url: "http://localhost/indiv/wes-brzozowski/" publication_r: id: 10245 title: "SyncWare News" type: "periodical" url: "http://localhost/periodical/syncware-news/" authors: "Wes Brzozowski" authors_r: - name: "Wes Brzozowski" slug: "wes-brzozowski" taxonomy: "indiv" url: "http://localhost/indiv/wes-brzozowski/" volume: "3" issue: "1" issues_articles: - id: 38947 title: "SyncWare News v3 n1" type: "issue" url: "http://localhost/issue/syncware-news-v3-n1/" pages: "12-13" pubdate: "September/October 1985" related_articles: - id: 39170 title: "The Fame & The Glory" type: "article" url: "http://localhost/article/the-fame-the-glory/" archive_link: false article_media: - id: 49718 title: "64 Column BASIC" type: "computer_media" url: "http://localhost/computer_media/64-column-basic/" --- # 64 Column BASIC 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 the 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. ## Source Code: 64 Column BASIC ``` 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" 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 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 ```