Date : Sun, 29 Jul 2007 11:24:50 +0100
From : adsb@... (Andrew Benham)
Subject: Comms software
Sprow wrote:
> Isn't that why you can set the handshake threshold with OSByte 203?
> Presumably a reliable link can be achieved by increasing this value from its
> default of 9 to (say) 18 or higher?
Sorry, that's too late. The bottleneck is in the interrupt service
routine, reading the characters from the UART and putting them in
the buffer. If the UART had a dedicated interrupt, things would be
different.
Remember the UART in the BBC doesn't have a FIFO, it buffers exactly
one character - and if another character arrives before you've read
the current character in the UART then you lose a character.
This is the reason why 16550s are found in PCs.
Remember also that the 'fast' devices in the BBC (the floppy, and
Econet) don't use the shared IRQ line but use the NMI line - exclusive
use of which is claimed by a filing system. And that the 'fastest'
device in the BBC (the hard disk) uses polled I/O rather than
interrupts.
You can also observe that BBC comms software tends to stop serial I/O
(either by hardware or software handshaking as appropriate) when
about to perform disk I/O (e.g. saving a block to disk, or retrieving
the next block from disk) because the disk I/O has CPU priority.
I'm now thinking whether there's a way to put a 16550 on the 1 MHz bus
and use NMI to handle it. Could speed up my program to backup my hard
disk to the serial port...
--
Andrew Benham adsb@...
Southgate, London N14, United Kingdom
The gates in my computer are AND OR and NOT, not "Bill"