Lets the Larken printer commands drive a serial printer through Ed Grey’s Z-SI/O RS-232 board. It asks for one of four settings (8/1/N or 7/1/E at 300 or 1200 baud), initializes the board’s 8251 chip, installs a 10-byte output driver in the LKDOS version 3 cartridge RAM at 16100 with PRINT #4: POKE, points the printer vector at it and opens the “lp” channel.
Supplied by Larry Kenny of Larken. It needs the LKDOS version 3 cartridge and the Z-SI/O board, so there is no download. The listing was also printed in Sinc-Link November-December 1988 (“Larken RS232 Printer Driver”); this January-February 1990 printing adds line 210, POKE 16090,80 (the line width).
Published in Sinc-Link January-February 1990 (A Larken TS2068 printer driver for a serial port).
Source Code
10 REM RS232 DRIVER FOR LKDOS
V3
15 RANDOMIZE USR 100: OPEN #4,
"dd"
20 LET st=191: REM 8251 STATUS
22 LET dt=159: REM 8251 DATA
25 PRINT "SELECT PARAMETERS"''
30 PRINT "1. 8/1/N AT 300 BAUD
"'"2. 7/1/E AT 300 BAUD"'"3. 8/1
/N AT 1200 BAUD"'"4. 7/1/E AT 12
00 BAUD"
40 INPUT "Select 1 - 4";a
50 IF a=1 THEN LET baud=111
60 IF a=2 THEN LET baud=123
70 IF a=3 THEN LET baud=110
80 IF a=4 THEN LET baud=122
90 IF a>4 THEN GO TO 40
100 REM Initialize RS232 Port
110 OUT ST,0: OUT ST,0: OUT ST,
0: OUT ST,64: OUT ST,BAUD: OUT S
T,183
120 REM Install Driver in LKDOS
cartridge using PRINT #4:POKE
130 FOR a=16100 TO 16109
140 READ v: PRINT #4: POKE a,v
150 NEXT a
160 PRINT #4: POKE 8216,16100
170 PRINT #4: POKE 16096,4
180 PRINT #4: OPEN #3,"lp"
200 DATA 219,ST,203,87,40,250,2
41,211,DT,201
210 PRINT #4: POKE 16090,80
1000 PRINT USR 100: SAVE "driver
.B1"Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.