SIO board input/output buffers

General discussions related to the Altair 8800 Clone

SIO board input/output buffers

Postby Jethro82 » July 8th, 2018, 1:42 pm

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.
Jethro82
 
Posts: 4
Joined: June 25th, 2018, 2:34 pm

Re: SIO board input/output buffers

Postby AltairClone » July 9th, 2018, 11:08 am

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
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am

Re: SIO board input/output buffers

Postby TomXP411 » July 9th, 2018, 1:24 pm

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.
TomXP411
 
Posts: 42
Joined: March 8th, 2018, 4:13 pm

Re: SIO board input/output buffers

Postby AltairClone » July 9th, 2018, 8:41 pm

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
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am

Re: SIO board input/output buffers

Postby TomXP411 » July 11th, 2018, 12:50 pm

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.
TomXP411
 
Posts: 42
Joined: March 8th, 2018, 4:13 pm


Return to General Discussions

Who is online

Users browsing this forum: Google [Bot] and 25 guests

cron