Bob’s Notebook: Near Letter Quality Printing

See all articles from Sinc-Link v10 n1
Author(s): Bob Mitchell
Publication: Sinc-Link
Pub Details: Sinc-Link v10 n1 (Volume 10, Issue 1)
Date: January/February 1992
Pages: 4-5

Just before I got my new 24-pin printer with NLQ and a host of other good features, I had written this routine to make my Fastext 80 pretend it was fitted to do NLQ printing. It does a fairly good job and I am sure it can be improved upon. Now that I have graduated to the new printer, its attraction for me has diminished somewhat but for others it may fill the bill: Type this in, save it and then run it. There are a few added notes at the end but the REM lines serve as simple instructions.

LISTING

  10 REM xxxxxxxxxxxxxxxx  (16 x's)
12 RANDOMIZE USR 100: OPEN # 3,"lp"
15 LET prog=PEEK 23635+256*PEEK 23636: LET prog=prog+5
20 RESTORE 50
30 FOR i=1 TO 16: READ v: POKE prog+i-1,v: NEXT i
50 DATA 33,0,130,1,0,126,62,32,119,35,11,120,177,32,247,201
60 REM ***********************
100 REM Tasword Special Loader to simulate NLQ Copy in Pica.
110 REM Use Single Sheet Paper.
120 REM Line 170 will switch in UK font if REM removed.
124 REM If the last line on a page does not double print press the On-line switch once.
126 REM When continuous line feeds occur, use BREAK to STOP action.
130 REM **********************
140 RANDOMIZE USR prog
150 RANDOMIZE USR 100: POKE 16090,69
160 GO SUB 270
170 REM GO SUB 250: LPRINT CHR$ 27;CHR$ 82;CHR$ 2: GO SUB 260
175 POKE 23658,0: CLS
180 GO SUB 280: RANDOMIZE USR 100: LOAD n$+".CT"CODE
185 DIM a$(65): LET j=1
187 INPUT "start line # ? ";sl: LET sl=sl-1: LET a=sl*64+33280
188 PRINT #0;"BREAK=STOP"
190 ON ERR GO TO 400: FOR i=a TO 53000
200 IF PEEK i<32 OR PEEK i>122 THEN LET a$(j)=CHR$ 32: LET j=j+1: GO TO 230
210 LET a$(j)=CHR$ PEEK i: LET j=j+1
220 IF j>64 THEN RANDOMIZE USR 100: POKE 16092,0: LPRINT a$: RANDOMIZE USR 100: POKE 16092,10: LPRINT a$: LET j=1: DIM a$(65)
230 NEXT i
240 STOP
250 RANDOMIZE USR 100: POKE 16093,32: RETURN
260 RANDOMIZE USR 100: POKE 16093,0: GO SUB 270: RETURN
270 RANDOMIZE USR 100: POKE 16094,10: LPRINT : RETURN
280 INPUT "Tasword file name (<=6) "; LINE n$: GO SUB 290: RETURN
290 INPUT "drv? ";drv: RANDOMIZE USR 100: GO TO drv: RETURN
400 ON ERR RESET: INPUT "1=more 0=quit ";mq: IF mq THEN RANDOMIZE USR prog: GO TO 180
410 GO SUB 290: RANDOMIZE USR 100: NEW
490 STOP
500 GO SUB 290 : RANDOMIZE USR 100: SAVE "tasnlq.Bb" LINE 10
510 STOP
999 REM test line follows:
1000 FOR i=33280 TO 34000: PRINT i,PEEK i;TAB 22;CHR$ PEEK i: NEXT i

Line 10 will house the code that makes this work. It will get its data from line 50 and note line 15 which finds the start of the program area to make sure the machine code in line 10 will really work.

Line 170 may not be of any value to you but if you want it to work, first check your printer manual and ensure that the code for the UK font is correct; 27, 82, 2 had to be changed to 27, 82, 3 for my 24-pin printer.

The main routine starts at line 140 which allows you to load a tasword file and choose a start line in that file. Then all the slight of hand to simulate NLQ takes place from line 190 to 230.

There are some sub-routines at lines 250 to 290, which handle the switch to UK font and back without the need for reading IN 127 and fiddling with that to get it to work with your printer and/or TS2068.

There is a test line at 1000 that I used to debug the routine. You could take that out.

Now a word or so about my new printer: it’s a Fujitsu DL900 (sounds like an imported sports car!). This came in at about $300, has a variety of fonts, prints in Portrait or Landscape mode, ie, the former on 8.5 x 11 sheets of paper, the latter with the same size paper turned sideways. This is handy for printing spreadsheets whose width exceeds the limits of the portrait mode.

R.H.MITCHELL
JAN 02 1992

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