To print from your Pascal program, open the printer with the command Rewrite
(f,"printer:"). The commands Write(ThePrinter,p1[p2,...,pn]) and WriteLn
(ThePrinter,p1[p2,...,pn]) cause the values represented by p1, p2, etc., to
be sent to the printer (See pages 9-16 thru 9-20 of the Macintosh Pascal
Reference Manual.). Since Pascal considers every peripheral device to be an
external file, a program never directly accesses a driver.
From within a program, printing sends data to the printer via the serial port
selected in the Chooser. A Laserwriter in the Diablo 630 mode (NOT over
AppleTalk) can print the text as can any printer that functions serially on
the Macintosh. Simply send the appropriate ASCII "escape" sequences for the
specific printer and then send the ASCII text.
To print the width of the 15" ImageWriter, the user should determine how many
characters are sent before sending a CR/LF, which in turn determines the
length of the line.
A good example would be the "PRINTTEXTFILE" sample included on the Pascal
disk, which includes a technique for setting up the printer so that it skips
page breaks.