Re: Serial I/O stuff

From: Ojala Pasi 'Albert' (albert_at_cs.tut.fi)
Date: 2000-02-07 08:38:06

> opening the printer (SETLFS, SETNAM, OPEN) and CHKOUT. And then calling
> CHRIN, converting the char, then CHROUT until BIT6 of ST (ST after
> CHRIN) is cleared.

Only one serial channel can be 'active' at a time. You are trying
to have one channel TALKing and another LISTENing, which does not
work. Ask the drive to talk (CHKIN), then read a block of chars
(CHRIN), then ask it to untalk (CLRCHN), then ask the printer to
listen (CHKOUT), send chars (CHROUT), then ask it to unlisten
(CLRCHN).

You can also do it one char at a time, but it will halve the
speed, because a lot of extra bus traffic is generated by
talk/listen/untalk/unlisten.

Calling CLRCHN is especially important with C128 and fast
serial devices, with C64 you are sometimes forgiven for not
using it.

-Pasi
-- 
"This is the fire I set when I woke up down here. I've come full circle."
"Don't we all?"
	-- Sheridan & Lorien in Babylon 5:"Whatever Happened to Mr. Garibaldi?"
-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.

Archive generated by hypermail 2.1.1.