[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it possible to receive data on a //c's printer port?
>
> Also, the printer port (as expected) reverts back to its defaults when the machine powers off, so I'd probably have to write some kind of startup program to get the port into the right state
>
0 REM "CHANGE.PORT"
1 REM THIS PROGRAM CHANGES THE
2 REM STARTUP CONFIGURATION OF
3 REM SERIAL PORT 1 OR 2
100 PN=1: REM SERIAL PORT 1
110 AD=0:IF PN=2 THEN AD=4
120 POKE 49153,0: REM 80STOREON
130 POKE 49237,0: REM SELECT AUXILIARY MEMORY
140 POKE 1144+AD,0: REM SET CONTROL REGISTER TO EXTRA SPEED (115.200bps) (1bit stop 8 bit data)
150 POKE 1145+AD,11:REM SET COMMAND REGISTER NO PARITY
160 POKE 1146+AD,1: REM COMM.PORT
170 POKE 1147+AD,0: REM NO CR INSERTION
180 POKE 49236,0: REM RETURN TO MAIN MEMORY