Classic Computer Magazine Archive ANTIC VOL. 8, NO. 2 / JUNE 1989

2 Column Print Pro

By Earl Haley

HELP files printed on half the pages.

Ever wish you could print the HELP file from the Antic monthly disk in two columns? Two Column Print-Pro prints text files in two columns on most 80-column printers. This handy BASIC program works on all 8-bit Atari computers with at least 32K memory, disk drive and printer.

As a thrifty Atari owner, I don't like wasting half a page of computer paper every time I use my 80-column printer to print 40-column documentation (such as the Antic monthly disk's HELP file). Inspired by the useful Doc Print-Pro program in the November 1988 Antic, I decided to write a similar program.

Two Column Print-Pro reads a 40-column text file and prints it in two columns on an 80-column printer--without requiring you to rewind the paper. You can print the whole document at once, or have the printer pause after each page. Since the program doesn't use any printer control codes, it should work on just about any 80-column printer.

GETTING STARTED

Type in Listing 1, TWOCOLMN.BAS, check it with TYPO II and SAVE a copy to disk before you RUN it.

If all you ever plan to do with this program is print the HELP file from the Antic monthly disk, the program will tell you all you need to know! Three or four simple keypresses will do it all.

The first screen asks whether you are using standard or legal size paper. Next, choose either continuous feed, or a pause after each page.

To print the HELP file from an Antic disk, put the disk in Drive 1. With the printer ready, choose option [1], ANTIC HELP FILE. The program will read the HELP file and print it in two columns.

PREPARING YOUR OWN TEXT FILES

To print your own document in two columns, load any text file into your word processor. Change the top margin to 0, the left margin to 0, and the the right margin to 38. Then print the document to disk as a new file. Be sure to use a different filename if you don't want to write over your present file!

TWOCOLMN.BAS should be able to read and print any 40-column (or less) text file. However, only files with an extender of .TXT will be listed by the program's disk directory, so it's a good idea to add a .TXT extender to the new file.

To preview the printed file, load your new file back into your word processor. Remove any extra carriage returns, and this time save the file to disk as a regular text file. (If you print the file to disk again your word processor will probably just put all those unwanted carriage returns back in, to fill out what it thinks are blank lines at the end of pages. As a result, your printout will contain a lot of unwanted blank lines.)

You should now be able to print your file in two columns using TWOCOLMN.BAS. Simply choose option [2], OTHER, when the program asks what file you want to print. At the next prompt, enter the name of your file, and your text will be printed in two-column format. Of course, I can't guarantee that you won't end up with half a sentence all by itself on the last page!

CUSTOMIZING THE PROGRAM

Two Column Print-Pro doesn't contain any machine language routines, so it should be fairly easy to customize. If your printer is capable of elite size type (12 characters per inch), you might insert your own printer control code in the program for a slightly neater printout.

You might also want to adjust the left margin by adding one or two blank spaces in line 290. For example, this line will make your left margin two spaces wider:

230 ?#2;" ";COL1$(S,F);COL2$(S,F)

The program removes the XXXs and some of the control codes in the Antic Disk's HELP files. If you would like to have them all print, change line 150 to:

150 INPUT #1,R$

If you decide to use single sheets of paper (so you can print on both sides of the page), watch out for a possible snag--when I remove the sheet of paper from my printer, the "out of paper" red light comes on. When I put in another sheet of paper, the red light goes out, but I often forget to make sure that my printer is reset to "on". The program just sits there, waiting for me to turn on the printer. If I turn the printer back on, the program resumes where it left off.

Earl Haley lives in Lockport, New York. This is his first appearance in Antic.

Listing: TWOCOLMN.BAS Download