Printer Ploys

Author(s): Charles A Barron
Publication: LISTing Newsletter
Date: January 1990
Pages: 9

Charles A Barron gets to grips with using his printer.

From ZX Computing

So Uncle Clive has killed off the ZX Printer – one of the most useful and impressive little toys he ever gave us. But then he gave us Interface I and who can resist plugging in a real live full-width printer to its little RS232 port?

But now that we all have a real printer, can we make best use of it? The first essential is some software to make the thing work properly – something like Tasword 2, perhaps, which will format our print-outs with neatly justified right-hand margins. But that’s just a start. Do your documents involve typing the same name or formula over and over again? Well, if your software allows you to seek and replace a word, you can save yourself a great deal of finger-tapping. For example, I spend most of my hours at my Spectrum pretending it’s a word-processor in order to write plays. Now the one thing you can be sure of in writing a play is that you are going to have a lot of repetitive typing: every time a character speaks you need his name in full. A page of quick-fire dialogue may use a character’s name 20 or 30 times, especially when you consider that you not only begin every speech with the speaker’s name, you also have the characters constantly addressing each other by name: You’ve seen the kind of thing:

MURGATROYD: Daphne!
DAPHNE: Murgatroyd! It’s you!
MURGATROYD: As you say Daphne, it is I.
DAPHNE: At last, Murgatroyd.

Four Murgatroyds and four Daphnes in just four lines of deathless dialogue. Most writers cheat, when writing their draft versions of the text, and use abbreviations for the names. Ever noticed how characters’ names always begin with different letters of the alphabet? That way we can just use the initial letter for identification in the early scripts. (We’re way ahead of one William Shakespeare here; Macbeth, Malcolm, Macduff – all in one play. He must have been fonder of quill-scratching than I am of keyboard-tapping.)

Once the rough draft has been cleaned up and polished, you just have to use the find-and-replace function to find all your character-identification initials and replace them with the names in full. So, the draft looks like this:

M: D!
D: M! It’s you!
M: As you say, D. It is I.
D: At last, M.

And the filled out version looks like the quotation above. A saving of 56 key-taps in four lines!

Once the play, or whatever, is complete, you’ll want to give it a finished look. Page numbers. Maybe even page headers? (That is where the title of the piece appears at the top of every page.) An unconscionable amount of typing for just a little fancy decoration. And none of the software packages for the Spectrum that I’ve come across allows automatic page numbering. That is the only really desirable function of those £5000 word processors that is missing on Uncle Clive’s little wonder. (Though by the time you’ve added Interface and the printer and a couple of microdrive cartridges to store your prose on, it is beginning to cost about as much as the £5000 job!).

Here is a little program that will give you automatic page numbering and automatic page headers at the cost of typing it not only once. It will only work if your printer/interface/software combination allows you to program in a form feed instruction: that moves the paper through the printer one full fanfold. You should also set them to give you automatic skip over the perforations, if that is possible.

Run off your document, keeping the perforations intact; tear off the last sheet and then feed in page one again, setting the top of the page carefully to where you would want the page header to come. Set the program running and the printer will run your printed play or White Paper through again, pausing only once every page to add the titles and page numbers.

In the program listing, which should work for the common types of dot matrix printers, you will have to set the baud rate to suit your own set-up, and put enough spaces into your title in line 20 to bring it to the desired position on the page. If your printer can be programmed with TAB settings, then you can use these instead of the row of spaces. The program begins by asking you how many pages your opus runs to. If you are too tired after composing the thing to face counting them, you can always lie to your computer and pretend to have written 2000 pages – it will give up the program of its own accord when it runs out of paper. (But it may never trust you to tell the truth again!).

CHR$ 12 is simply the Form Feed control code; your machine may need a different code, though that is unlikely. Refer, as they say, to the manual and adjust the program accordingly. ‘As The Bat At Noon’ is what we call in the trade a variable; please don’t name all your documents after my play.

PROGRAM LISTING

 3 "No of pages?";n
5 FORMAT "b";4800: OPEN #3;"b"
10 FOR a=1 TO n
20 LPRINT " As The Bat At Noon ";a
30 LPRINT CHR$ 12
40 NEXT a
50 CLOSE #3