Two-Column & Wide Tasword Printouts

See all articles from Update April 1991
Author(s): Robert Hartung
Publication: Update Magazine
Pub Details: Update April 1991
Date: April 1991
Pages: 43

Bob Hartung, [address omitted]

The following routine was devised to get around the hassle of doing a double-pass to print out side-by-side columns from TASWORD files. With a little afore-thought in forming the file, it will also print 65-128 characters per line with alternate lines continued on the same line as the one preceding. To do this, word-wrap and right-justify must be turned off unless all justification is done in the second part of printed line.

If a file is already in RAM either from being loaded or written into TASWORD, it will be preserved when this routine is loaded in after a BREAK is made from TASWORD Basic. Stored files may also be loaded into the routine if device syntax is changed from Oliger SDOS as listed. A printer driver must be installed if you do not have SDOS or a driver on EPROM.

NOTE: If lines 20-70 are deleted from this routine and tape commands and FIND/REPLACE deleted from TASWORD, this routine may be merged with TASWORD. Add POKE 23300,60: POKE 23301,3 to line 9700 to use SDOS printer driver with lines 9702-9704, or else delete these lines.

  20 CLEAR 33000
30 ON ERR RESET
40 INPUT "LOAD tasfile - f"'"Do LPRINT - d"'"PRINTER set - c ";a$
50 IF a$="f" THEN INPUT "File name: ";a$: LOAD /a$CODE
60 IF a$="c" OR a$="d" THEN GO TO 9700
70 GO TO 40
9700 ON ERR RESET : LET /p=o
9701 LET d$="": CLS : LET o=NOT PI: LET I=SGN PI
9702 INPUT "Enter 4 to skip printer-set ";s$: IF s$="4" THEN GO TO VAL "9705"
9703 INPUT "Prtr CODE -1 TO STOP ";b: IF b<>-I THEN LET d$=d$+CHR$ b: PRINT b;" ";: GO TO VAL "9703"
9704 LPRINT d$: IF a$="c" THEN GO TO VAL "22"
9705 INPUT "Left Marg: ";u'"Ctr Marg (>=2): ";c'"No. chrs/col: ";cols: DIM c$(c): DIM d$(u): LET u=o: IF cols>VAL "64" THEN LET u=I
9708 INPUT "First line no. to print: ";firstln: LET firstln=firstln-I: LET tasfile=VAL "firstln*64+33280": LET b=I: LET c=I
9709 ON ERR GO TO VAL "9800"
9710 LET linect=o: LET pglines=VAL "54"
9711 FOR N=tasfile TO VAL "52480" STEP VAL "64"+VAL "64"*u
9712 PRINT AT INT PI,o;
9715 INPUT "": PRINT #o;AT I+I,o;" LINE ";c'" BREAK LPRINT TO STOP ";pglines;"-";linect+I
9730 LPRINT d$;
9735 FOR J=N TO N+cols-I
9740 IF PEEK j>VAL "31" AND PEEK j<VAL "128" THEN PRINT CHR$ PEEK J;: LPRINT CHR$ PEEK J;
9741 NEXT J
9742 LET c=c+I: IF u THEN LPRINT : GO TO VAL "9770"
9743 LET cols2=N+pglines*VAL "64"-I
9745 LPRINT c$;
9746 PRINT AT INT (PI*PI),o;
9747 FOR x=cols2 TO cols2+cols
9748 IF PEEK x>VAL "31" AND PEEK x<VAL "128" THEN PRINT CHR$ PEEK x;: LPRINT CHR$ PEEK x;
9749 NEXT x
9750 LPRINT
9762 LET linect=linect+I: IF linect=pglines THEN LET pglines=VAL "57": LET linect=o: LET N=cols2+I: GO TO VAL "9900"
9770 NEXT N
9800 PRINT FLASH I'" STOP LPRINT ": PAUSE VAL "100": LPRINT : ON ERR RESET : GO TO VAL "20"
9900 LET b=b+I: INPUT "Insert PAGE ";(b);b$
9920 GO TO VAL "9770"

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.