SIO board input/output buffers

General discussions related to the Altair 8800 Clone
Post Reply
Jethro82
Posts: 4
Joined: June 25th, 2018, 2:34 pm
Contact:

SIO board input/output buffers

Post by Jethro82 »

First does anybody know how the check(and clear) the keyboard buffer on the default settings for main board(the one the monitor is set to work with).
Second does anybody know how to check if the output buffer is clear. I have programs that work fine in single step mode but skip a bunch of characters during regular operation.
AltairClone
Site Admin
Posts: 677
Joined: April 5th, 2013, 10:55 am
Contact:

Re: SIO board input/output buffers

Post by AltairClone »

Is the console serial port configured as a "2SIO" (88-2SIO, typically the default) or as an "SIO" (88-SIO) as mentioned in the thread title?

Mike
TomXP411
Posts: 42
Joined: March 8th, 2018, 3:13 pm
Contact:

Re: SIO board input/output buffers

Post by TomXP411 »

The SIO port has a single data register, so it can only hold one byte at a time. You need to query the status register to determine whether there's a byte waiting to be read or if the byte in the output buffer has been written. And since the buffer only holds one byte, you need to handle input at least as fast as it's coming in.

IIRC, when bit 0 is set, you need to read the data register. When bit 1 is set, you can write to the output register.
AltairClone
Site Admin
Posts: 677
Joined: April 5th, 2013, 10:55 am
Contact:

Re: SIO board input/output buffers

Post by AltairClone »

If using a 2SIO port, then check bit 0 of the status register for 1 to indicate a new character is present in the input data register. Check bit 1 of the status register for 1 to indicate the data register can accept a character for output.

If using an SIO port, then check bit 0 of the status register for 0 to indicate a new character is present in the input data register. Check bit 7 of the status register for 0 to indicate the data register can accept a character for output.

Mike
TomXP411
Posts: 42
Joined: March 8th, 2018, 3:13 pm
Contact:

Re: SIO board input/output buffers

Post by TomXP411 »

AltairClone wrote:If using a 2SIO port, then check bit 0 of the status register for 1 to indicate a new character is present in the input data register. Check bit 1 of the status register for 1 to indicate the data register can accept a character for output.

If using an SIO port, then check bit 0 of the status register for 0 to indicate a new character is present in the input data register. Check bit 7 of the status register for 0 to indicate the data register can accept a character for output.

Mike
Ooh, I hadn't realized there was a functional difference between the two. That explains the discrepancy between what I actually observed while testing the ports and what the documentation I found actually said.

Thanks, Mike.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests