#xon/xoff
15-Jun-86 15:26:50
Sb: #22953-#xon/xoff
Fm: Larry Phillips/ICUG 74025,636
To: Richard Webb 74005,1265
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
Richard, the problem with that code is twofold.
1. You are still doing single character I/O, with it's unacceptable overhead
required to set up the blitter to do the transfer.
2. It runs the CPU all the time, and thus is not "friendly" to tasks with
lower priority.
I was thinking more along the following lines. Assume that we come out of our
Wait() (as does Aterm) because we have received an Intuition message telling
us that something needs our attention.
REPEAT
GET (char from serial)
PUT (char to buffer)
UNTIL (char = 0)
Write() (buffer to screen)
GoBackToSleep
This is of course very general, and assumes we were awakened by the serial
port message, but it should work fine. (This is approximately the way
recommended by someone at Amiga when asked why term progs could not keep up)
You are right about the "sleepy time" between characters, but perhaps you
aren't aware of the enormous overhead required to do single character I/O to
the screen. What the above will do is to "catch up" ever time it goes to the
serial port, no matter how long our delay was.