Antigrav Toolkit Notebook
by Randy Winchester
Accessing Laser Printers

One feature sets GEOS apart from all other software for Commodore computers. It's the ability to produce high quality output on a laser printer. This month we take a look inside geoLaser and explore some hidden features not mentioned in the user's manual. There might even be a laser printer in your future . . . 

Top Secret Communications

A lot of people aren't going to believe this. There is telecommunications software on the Writer's Workshop disk. Not only that, but this same GEOS application can write programs. It requires no knowledge of programming to use. The programs it produces are complete, fully executable programs written in a secret high level language. The chances are, even if you have Writer's Workshop, you've never even used this program. 

The application is geoLaser, and the reason most people haven't given it a try is because they don't have a laser printer to toy around with. Not many hobbyists can afford a computer peripheral that costs almost as much as a new car. Even if you have a laser printer on hand, keep reading. There are quite a few tricks you can coax out of a laser printer aside from working with GEOS. If you're like most people, you probably don't have a laser printer at home. That's perfectly alright. Not having a laser printer is what prompted me to do these experiments. 

So what of the secret language? This mystery language is called PostScript, which is the language GEOS uses to communicate with laser printers. A laser printer such as the Apple LaserWriter is an intelligent peripheral in much the same way as a Commodore disk drive. It has it's own RAM memory, microprocessor (a 68000, same as the Amiga!), and operating system. In some ways it makes sense to think of the LaserWriter as a specialized computer than merely a printer. It even has the PostScript language interpreter built into it. 

PostScript was developed by Adobe Systems as a page description language. It's purpose is to define text and graphics objects and place them on a conceptual page located in memory. When the word is given, these graphics are painted onto a physical page on a sheet of paper. 
When geoLaser is used with a laser printer, it reads a geoWrite file and translates it into a PostScript program. This PostScript program is transmitted to the laser printer, where the PostScript interpreter translates it into text and graphics. When the page definition is complete, the text and graphics get painted onto a page of paper. 

geoLaser isn't the only GEOS program that can output PostScript programs. The LaserWriter printer driver also produces PostScript, and can be used with geoPaint and other GEOS applications. 

Connecting to a Laser Printer

Imagine for a minute a situation in which you have a laser printer and a Commodore computer in the same room. They have to be connected in order to use them together. The LaserWriter has two communications ports, of which one is a female RS-232 jack. An RS-232 interface is required to connect the LaserWriter with the Commodore user port. The user port is the same port used for modems. One RS-232 interface which is known to work with the Commodore and LaserWriter is the Omnitronix Deluxe RS-232 Interface. Make sure that the power is turned off on all equipment, then plug the interface into the computer, and the RS-232 connector to the LaserWriter. Set the baud rate switch on the printer to 1200 and turn on the power for the equipment. 

Start GEOS running on the computer and insert a disk with a geoWrite document and the geoLaser application. Double click on the geoLaser icon. The first dialog box will ask you to choose a baud rate. Select 1200 and click on the OK box. Then a dialog box will ask you to select a file. Pick one and click on the Open box. 

If everything goes well, you'll see the familiar Printing... Cancel box and the screen border colors will flash. In a minute or so, you'll have a high quality printed copy of your document. 

Sneaking In Through the Side Door

What if you can't get a Commodore and a laser printer together in the same room? Even if you can find a laser printer that's a big possibility, since most laser printer owners are a bit reluctant to connect to a computer that costs ten times less than their printer. There are a couple of ways in which you can get your documents printed on a laser printer you might have access to, yet can't directly connect to. This might be a laser printer at your school or job, or one in the possession of a business, such as a copying or printing shop. 

One method which has been used is to connect a 1200 baud modem to the LaserWriter. If the modem can be set to auto answer, you can call it from your computer. In the case of a Hayes command set modem which needs to have auto answer switched on, first connect the modem to a computer or terminal and issue the auto answer command (ATS0=1). Turn the computer or terminal off, but leave the modem power on. Disconnect the modem from the computer, and connect it to the LaserWriter. Turn the LaserWriter's power on. 

If you run a terminal program on your Commodore computer, you can dial up and connect to the modem attached to the LaserWriter. Once a connection is established, boot GEOS and run geoLaser or print using the LaserWriter printer driver. The output from GEOS will go to the LaserWriter, and your pages will be waiting for you. 

The second method opens up even more possibilities, and is the focus of the remainder of this article. In this method, PostScript files are created and saved on disk. These files can be saved by almost any computer in almost any imaginable disk format. They can be sent directly to a computer connected to a LaserWriter. 

If you have access to two computers with modems (one computer must be a Commodore) and terminal software, you can transfer files between them. You will need software on the receiving computer that has either a capture buffer, or can receive an incoming text file and save it to disk (sometimes referred to as session logging). A BBS (bulletin board system) program for the remote system is ideal. If you will be sending to a Unix machine or other large system, use a text editor, such as Emacs. Practically any terminal software will be fine for the Commodore end as long as it doesn't disconnect the modem from the phone line when you try to exit. Pick a favorite. 

Run terminal software on both computers. You will either have to control the remote system via software over the phone lines BBS style, or have someone stationed at the remote computer who can control it for you. When the computers are connected, you will need to open the capture buffer or text file on the receiving computer. When this has been done, boot GEOS on the Commodore. 

From GEOS, you again have the option of using geoLaser or the LaserWriter printer driver to transmit the PostScript program. Select a GEOS document, print it, then quit to the deskTop. Restart the terminal software. If you have terminal software on a GEOS disk, you can get it running quickly by double clicking on it. 

Close the text file or capture buffer on the receiving computer. If you use the capture buffer method, make sure to save the buffer to disk. The file will be a PostScript program, created by GEOS. 

Keep in mind that this method of transferring files is what some computer hackers would call "a grody hack." Unlike many transfers, such as those done with XMODEM or Punter, there is no check for or correction of errors on the incoming PostScript program. If you have the two computers in the same room or connected over clean telephone lines, you probably won't have any problems. If you're using noisy phone lines, you might have to try sending the file several times before you get one that works. 

Printing PostScript Programs

Now that you have a PostScript file stored on a machine connected to a LaserWriter, you'll need to be able to print it. The procedures for doing this with different types of computers is beyond the scope of this short article. It should be similar to the method of connecting a Commodore to a LaserWriter, or might entail running terminal software in order to talk with the laser printer. If you use a networked computer, such as a Unix system, some editing needs to be done on the file before it can be printed. Insert a line at the beginning which reads: %!postscript. This tells the laser printer that the incoming file is to be interpreted as a PostScript program instead of being printed as text. 

GEOS has even more untapped and undiscovered capabilities. Generating PostScript files and accessing remote laser printers from GEOS applications are just a few of many things that you can do that probably weren't intended by GEOS's creators. It's nice to know that these hidden features exist, and can be easy and convenient to use. You can't argue with the results! 

In the next article we will dissect a PostScript program to see what makes it tick. 
 

I would like to include your GEOS hints & tips and bug reports in future columns. If you have any brief GEOS tricks, bugs, helpful hints, or whatever, please send them to me. 
Randy Winchester
P.O. Box 426074
Cambridge, MA 02142
In exchange for material submitted on disk, I'll return a disk of some of the best public domain GEOS software. 