[net.micro.atari] Using a RS232 printer on the ST

peters@pulman.DEC (Don Peters, APO-1/F8, 289-1242) (12/18/85)

As many of you ST owners know, you cannot now easily use an RS232 type
printer on your ST due to a bug in TOS which does not let you configure
the serial port to any speed other than 9600 baud. Since I only have a
Digital LA50 serial printer (max baud rate=4800), this was a real
problem.

However, I just discovered that the VT52 emulator will also allow you to
set your serial port baud rate, but IT WORKS! Armed with this info, I
wrote a small BASIC program to read a file and print it. The only
problem I found with BASIC is that the EOF() function doesn't seem to
work as advertised (use ON ERROR instead, and look for ERR=62) and the
LINE INPUT statement misses the first character of the first line of a
file. The core of the program is:

     50 ON ERROR GOTO 1000
     60 INPUT "File to print:";F$
    100 OPEN "I",#1,F$
    200 LINE INPUT #1,A$
    300 FOR CPOS=1 TO LEN(A$)
    400 OUT 1,ASC(MID$(A$,CPOS,1))
    500 NEXT CPOS
    600 OUT 1,13:OUT 1,10  'CR & LF
    700 GOTO 200
    800 CLOSE #1
    900 END
    1000 IF ERR=62 THEN RESUME 800


Now, if only it could be compiled so it could be run without loading
BASIC!

     /Don Peters, Digital, 617-689-1242/

        ...decvax!decwrl!dec-rhea!dec-pulman!peters
Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site sdcrdcf.UUCP
Posting-Version: version B 2.10.2 9/18/84; site decwrl.UUCP
Path: sdcrdcf!sdcsvax!ucbvax!decwrl!dec-rhea!dec-pulman!peters
From: peters@pulman.DEC (Don Peters, APO-1/F8, 289-1242)
Newsgroups: net.micro.atari
Subject: Using a RS232 printer on the ST
Message-ID: <60@decwrl.UUCP>
Date: 18 Dec 85 14:11:31 GMT
Date-Received: 19 Dec 85 10:16:31 GMT
Sender: daemon@decwrl.UUCP
Organization: Digital Equipment Corporation
Lines: 34

As many of you ST owners know, you cannot now easily use an RS232 type
printer on your ST due to a bug in TOS which does not let you configure
the serial port to any speed other than 9600 baud. Since I only have a
Digital LA50 serial printer (max baud rate=4800), this was a real
problem.

However, I just discovered that the VT52 emulator will also allow you to
set your serial port baud rate, but IT WORKS! Armed with this info, I
wrote a small BASIC program to read a file and print it. The only
problem I found with BASIC is that the EOF() function doesn't seem to
work as advertised (use ON ERROR instead, and look for ERR=62) and the
LINE INPUT statement misses the first character of the first line of a
file. The core of the program is:

     50 ON ERROR GOTO 1000
     60 INPUT "File to print:";F$
    100 OPEN "I",#1,F$
    200 LINE INPUT #1,A$
    300 FOR CPOS=1 TO LEN(A$)
    400 OUT 1,ASC(MID$(A$,CPOS,1))
    500 NEXT CPOS
    600 OUT 1,13:OUT 1,10  'CR & LF
    700 GOTO 200
    800 CLOSE #1
    900 END
    1000 IF ERR=62 THEN RESUME 800


Now, if only it could be compiled so it could be run without loading
BASIC!

     /Don Peters, Digital, 617-689-1242/

        ...decvax!decwrl!dec-rhea!dec-pulman!peters