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.
SIO board input/output buffers
-
- Posts: 4
- Joined: June 25th, 2018, 2:34 pm
- Contact:
-
- Site Admin
- Posts: 677
- Joined: April 5th, 2013, 10:55 am
- Contact:
Re: SIO board input/output buffers
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
Mike
-
- Posts: 42
- Joined: March 8th, 2018, 3:13 pm
- Contact:
Re: SIO board input/output buffers
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.
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.
-
- Site Admin
- Posts: 677
- Joined: April 5th, 2013, 10:55 am
- Contact:
Re: SIO board input/output buffers
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
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
-
- Posts: 42
- Joined: March 8th, 2018, 3:13 pm
- Contact:
Re: SIO board input/output buffers
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.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
Thanks, Mike.
Who is online
Users browsing this forum: No registered users and 8 guests