This is one of them utilities designed for a job at hand. Friends used to send me letters on cassette or disk and I was kinda like the poor guy who couldn’t read writing. I’d have to fake it and call them to discuss what they’d said, because the data file was in Code files. Mostly these files were either Mscript or Tasword files. Both are good word procesors, but that didn’t matter as I dont use either and it was Greek to me! I use Smart Text which saves data in Character arrays.
So, that sets the senario. Then when Bob Mitchell sent me 10 pages of Tasword code files, that did it! “MS-TAS” was the result. Now take time out to look at Bob’s documentation in this issue. All of it was printed out with this utility MS-TAS, without a word processor. The print product was good enough that all I had to do was run it through the copier. “MS-TAS” grabs Code files out of Disk (or Cassette) and prints them to paper. This particular program works with LARKEN DOS, OLIGER DOS, AERCO FD-68, or CASSETTE. And it works with either CENTRONICS or TS-2040 printer.
I’ll now donate MS-TAS to public domain so that the Clubs can have at it. (Would be nice if Credits were mentioned). Now since MS-TAS will work with WHATEVER configuration one has, we will use MS-TAS as this issue’s Programming Tutor. You Lads and Lassies who dont need no tutoring can just start keying in and skip the prose.
MS-TAS looks like a lot of programming, but it trims down to a few lines when the extra stuff for other Disk Systems and Cassette is eliminated. The plan is to use menus to make you create variables to pin down your equipment types (artificial intelligence). Then Sub Routines are used for Cassette, for Larken Disk, for Oliger Disk, for Aerco FD-68 Disk, for Centronics Printer, or for TS-2040 printer.
Once your equipment is identified, then a disk catalog will be given. A prompt for INPUT of a CODE FILE NAME will be presented at the bottom of the Catalog. Then, while the cat is still visable, other prompts ask for Code Start address, and byte length. Any “friend” who sends you Code data will tell you these two essential bits of information. But if using the Oliger V2-52, the info will be on screen. The last prompt will be for LINE LENGTH for printing. The disk Code File will then LOAD, and begin printing. If the line length input isn’t right, the print out wont look so good, and you’ll have to stop and start over with the right line length that you figured out from the wasted page.
If you BREAK during printing, you’ll need to <<CLOSE# 2>>, because if you dont, any PRINT or LIST will print to paper instead of the screen. Since all variables are identified within the program lines, you can repeatedly use RUN to start the program. The program remains in memory while the Code files are printing, so you can print out one code file after another until everything has been printed. Now thats the way the program operates. We will now investigate the programming.
8972 and 8974 sets the vars used for sub-routine <GO TO> or <GO SUB>, then the screen colors, then gives information.
8976 begins the artificial intelligence gathering by assigning var “pr” to the type of printer in use. pr=1 for TS-2040 or pr=2 for Centronics.
8978 gathers more intelligence and assigns var “lf”. lf=1 if your printer needs a line feed, else lf=2. Might mention the <GO SUB y>. “y” was set to =9600 in line 8972. Look at line y (9600). This is a INKEY$ routine which waits for a key to be touched and then assigns that key to variable “z”. Note the “-48” which makes z=the numbered key struck. AND, there is a trap here which refuses to accept any key except “1” or “2”. Also note the RETURN at line 9602. Subroutines such as this one <<GO SUB y>> are used repeatedly from any line in a program, thus saving many program lines.
8980 gathers some more intelligence, this time “what kind of DOS?” Variable “tm” is set accordingly. Example- if Oliger Disk then tm=2.
Now the “program knows” everything about your TS-2068 system! The variables are set so that the right sub-routines can be called for Oliger Disk, Larken Disk, Aerco FD, or Cassette. And for Centronics or TS-2040. And for giving or not giving a line feed. All of that only took a few seconds and we’re now ready for some action.
8982 Here’s the first action. We use BOOLEAN logic to determine which GO SUB routine to use to CAT the directory. “tm” is the variable set back at line 8980. The logic is actually four IF THEN conditionals. I’ll give you the first and you can visualize the others. <GO SUB (tm=1)*9200> means <IF tm=1 THEN GO SUB 9200>. Next, IF tm=2 THEN GO SUB 9360.
Lets look at 9360. That is the Oliger DOS syntax to initialize the Centronics printer. Then there a <GO SUB 9340> which is to INPUT line width. This same subroutine (9340) is used with whichever DOS elected. After this we are back at 9360), the line width is POKED. The LPRINT is to return the printer carriage. Then we RETURN to line 8984.
8994 diverts to line 9000 “if using cassette and TS-2040”
8996 is another BOOLEAN logic having three possible routes for the GO SUB. We will take one route. If tm=3 then Larken DOS has been elected back at line 8980, so the <GO SUB 9330> will execute. At line 9330 we see the Larken syntax for CAT. The Catalog is put on screen. Then there is a <GO SUB 9370>. Follow that and we find a dual use prompt to INPUT the “title of the Code program to load”. Then its back to 9330 again where the Larken LOAD is accomplished. Now we have the code file that we want to print out loaded. The RETURN puts us back to line 9000.
9000 At this time the Catalog is still on screen. The Code file has been loaded. The program asks for INPUT of “starting address” and then “byte length” of the code file. Any “friend” who sends text in code will tell us that. But if using the Oliger catalog, it will show this information. Next, we need to INPUT the format line length. Guess at 64 if you dont know.
9002 here we poke the line length to the Oliger control address, and at line 9004 we poke the line length-one to the Aerco prcode control address.
9006 here we <OPEN# 2,”p”> to send PRINT to the printer instead of to the screen. Then we start the counter “n” to count from “Code Start address” to “sa+byte length”, in STEPs of the line length.
9008 Now we start counter “y” to count from “n” to the end of the line which will be “n+ll-1”.
9010 here we PEEK the code file at the “y” address, and assign the Code of the peeked character to var “c”.
9012 mscript uses ENTER to skip a line. ENTER is code 13. So here we cause a line feed each time code 13 is peeked from the code file.
9014 here the PEEKED character is printed, one at a time, as the y counter counts. Note the “;” which avoids a carriage return and keeps the next print position on the same line.
9016 next y gets the next peeked character until y counts up to the line length, upon which time line 9018 will execute.
9018 if tm>2 then we are using the Aerco printer code for Larken or Aerco DOS. The PRINT is to account for a built in glitch in the Aerco prcode.
9020 var lc is the line counter. lc is incremented. If lc reaches 56 then a page end is directed. CLOSE# 2 allows a prompt to be put on screen. Line count is put back to one, <OUT 127,12> causes the printer to feed the form to the next page beginning. The prompt is give to adjust the page (single sheet printer). Then when ENTER is touched <OPEN# 2,”p” puts PRINT back to the printer.
9030 next n gets the next line of characters PEEKED from the Code file.
9035 will only execute after all of the characters in the code file has been peeked and printed. We’re finished. So we CLOSE# 2, and give options on screen.
9050 if we elected to get the next file, the whole process starts over, but without the intelligence gathering. The Catalog is gotten to load in the next code file to print.
8982 somehow I skipped part of the action of this line for the Aerco FD-68 and Larken DOS. If either of these are in use, then the Aerco prcode is needed for Centronics printing. If “tm=3” (Larken DOS) then the GO SUB is to line 9310 to LOAD and initialize the Aerco prcode. But if the Aerco FD-68 is in use, the GO SUB is to line 9300 to load and initialize the Aerco prcode. If the Oliger DOS is in use there is no need to load a code table, as the printer code is contained in the SAFE EPROM.
While printing, you may BREAK and stop the printing. When you do that do a <CLOSE# 2> in order to re-direct PRINT to the screen. This will be when you elect a line length that is different from that formatted by the author of the Code data. You can determine the correct line length to input by looking at the aborted print out. Then just type <RUN ENTER>. Print out is fairly fast, as fast as my daisy wheel printer can print. But it wont be as fast as a dot matrix printer can print in the draft (fast) mode.
-MS-TAS-
A utility to PEEK and PRINT TASWORD and MSCRIPT Code Data files from Disk or Cassette.
* Does not require the software to be loaded.
8970 REM ** TS-2068 UPDATE **
8972 LET x=9610: LET y=9600: CLOSE #2: BORDER 0: PAPER 0: INK 7: CLS : PRINT '''TAB 8;"TS-2068 UPDATE"'''"* Utility to PEEK and Print out MSCRIPT and TASWORD Data Files from Disk."'''"* Does not require Word Proc to be loaded."'''"* DOES Require;"'''"1. Aerco or Oliger Printer Intfc to be installed."'''"2. Centronics Printer -ON- READY"''''"SET EQUIPMENT, THEN ENTER": PAUSE 0: CLS
8974 PRINT AT 10,2;"Set Printer ON and READY"'TAB 2;"Then [ENTER]": PAUSE 0: CLS
8976 PRINT AT 10,12;"Select-"'''TAB 5;"<1> TS-2040 Printer"''TAB 5;"<2> Centronics Printer": GO SUB y: LET pr=z: IF pr=1 THEN GO TO 8980
8978 CLS : PRINT AT 10,1;"Does Printer need a Line Feed?-"'''TAB 4;"<1> Yes - or - <2> No": GO SUB y: CLS : LET lf=z
8980 PRINT AT 10,2;"Input DOS or Cassette"''TAB 5;"<1> Cassette"''TAB 5;"<2> Oliger DOS"''TAB 5;"<3> Larken DOS"''TAB 5;"<4> Aerco FD-68 DOS": GO SUB x: LET tm=z: IF z<1 OR z>4 THEN GO TO 8980
8982 GO SUB (tm=1)*9200+(tm=2)*9360+(tm=3)*9310+(tm=4)*9300
8984 IF tm=1 AND pr=1 THEN GO TO 9000
8996 GO SUB (tm=2)*9325+(tm=3)*9330+(tm=4)*9320
9000 LET Lc=1: INPUT "Input File Starting Address ";sa: INPUT "Input File Byte length ";bL: INPUT "Format Line Length? ";LL
9002 IF tm=2 THEN POKE 23323,LL
9004 IF tm>2 THEN POKE 64458,LL-1
9006 CLS : OPEN #2,"p": FOR n=sa TO sa+bL STEP LL
9008 FOR y=n TO n+LL-1
9010 LET c=PEEK y
9012 IF c=13 THEN PRINT '
9014 PRINT CHR$ c;
9016 NEXT y
9018 IF tm>2 THEN PRINT
9020 LET Lc=Lc+1: IF Lc>55 THEN PRINT : CLOSE #2: LET Lc=1: OUT 127,12: BEEP PI/oj,ol: CLS : PRINT AT oj,od;"Adjust Page, then ENTER": BEEP PI/oj,ol: PAUSE 0: CLS : OPEN #2,"p"
9030 NEXT n
9035>PRINT : CLOSE #2
9040 PRINT AT 10,6;"<1> for Next File"''TAB 6;"<2> To QUIT": INPUT "Choice?";a: IF a<1 OR a>2 THEN GO TO 9040
9045 IF a=2 THEN STOP
9050 GO TO 8996
9200 PRINT AT 10,2;"Advance Tape to Index spot,"''TAB 2;"Then [ENTER]": PAUSE 0: CLS : PRINT AT 15,6;"CODE LOADING": CLS : RETURN
9300 OUT 244,1: CAT "prcode.bin",: GO SUB 9350: RETURN
9310 RANDOMIZE USR 100: OPEN #4,"dd": PRINT #4: LOAD "prcode.C1"CODE : GO SUB 9340: GO SUB 9350: RETURN
9320 OUT 244,1: CAT "",: GO SUB 9370: CAT "z$",: RETURN
9325 CAT : GO SUB 9370: LOAD /z$CODE : RETURN
9330 RANDOMIZE USR 100: OPEN #4,"dd": PRINT #4: CAT "",: GO SUB 9370: LOAD z$CODE : RETURN
9340 INPUT "Input Line width ";lw: RETURN
9350 POKE 23703,205: POKE 23704,251: POKE 64451,254: POKE 64456,1: POKE 64457,0: POKE 64459,Lw-1: POKE 64460,0: POKE 64458,(10 AND Lf>1)+(0 AND Lf<2): LPRINT : RETURN
9360 LET /p=o: GO SUB 9340: POKE 23323,Lw: POKE 23324,(0 AND Lf>1)+(10 AND lf<2): LPRINT : RETURN
9370 INPUT "ENTER TITLE of CODE to LOAD [everything between Quotes] ";z$: RETURN
9600 PAUSE 0: LET z=CODE INKEY$-48: IF z<1 OR z>2 THEN GO TO 9600
9602 RETURN
9610: PAUSE 0: LET z=CODE INKEY$-48: RETURN
-MS-TAS- Abbreviated for Oliger DOS
8990 CLOSE #2: BORDER 0: PAPER 0: INK 7: CLS : PRINT '''TAB 8;"TS-2068 UP-DATE"'''"* Utility to PEEK and Print out MSCRIPT and TASWORD Data Files from Disk."'''"* Does not require Word Proc to be loaded."'''"* DOES Require;"'''"1. Aerco or Oliger Printer intfc to be installed."'''"2. Centronics Printer -ON- READY"''''"SET EQUIPMENT, THEN ENTER": PAUSE 0: CLS
9000 LET /p=o: POKE 23324,0: LET lc=1: LPRINT : CAT : INPUT "Input Disk File Name";z$: INPUT "Input File Starting Address";sa: INPUT "Input File Byte Length";bl: INPUT "Format Line Length";ll: POKE 23323,ll: LOAD /z$CODE : OPEN #2,"P": FOR n=sa TO sa+bl STEP ll
9005 FOR y=n TO n+ll-1
9010 LET c=PEEK y
9015 IF c=13 THEN PRINT '
9020 PRINT CHR$ c;
9025 NEXT y: LET lc=lc+1: IF lc>55 THEN PRINT : CLOSE #2: LET lc=1: OUT 127,12: BEEP 1,20: CLS : PRINT "Adjust Page, THEN ENTER": PAUSE 0: OPEN #2,"P"
9030 NEXT n
9035 CLOSE #2
9040 PRINT ''"<1> For next file"''"<2> To Quit": INPUT "Choice?";a: IF a<1 OR a>2 THEN GO TO 9040
9045 IF a=2 THEN STOP
9050 GO TO 9000
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.