Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | 156 (&9C) |
R1 | EOR value |
R2 | AND value |
Exit | |
---|---|
R0 | Preserved |
R1 | State before being overwritten |
R2 | Keyboard disable flag (see OS_Byte 201) |
The purpose of this call is to read or write the serial port state.
This call is now deprecated. Please use OS_SerialOp 0 and OS_SerialOp 1 to change the receive interrupt/control bit instead.
When writing, the effects depend on R1:
Bits | Value | Effect |
---|---|---|
0 – 1 | 0 – 2 | No effect |
3 | Reset transmit, receive, control registers | |
2 – 4 | 0 | 7 bit, even parity, 2 stop bits (7E2) |
1 | 7 bit, odd parity, 2 stop bits (7O2) | |
2 | 7 bit, even parity, 1 stop bits (7E1) | |
3 | 7 bit, odd parity, 1 stop bit (7O1) | |
4 | 8 bit, no parity, 2 stop bits (8N2) | |
5 | 8 bit, no parity, 1 stop bits (8N1) | |
6 | 8 bit, even parity, 1 stop bits (8E1) | |
7 | 8 bit, odd parity, 1 stop bit (8O1) | |
5 – 6 | 0 | RTS low, transmit interrupt disabled |
1 | RTS low, transmit interrupt enabled | |
2 | RTS high, transmit interrupt disabled | |
3 | RTS low, transmit interrupt disabled, break level on transmit data | |
7 | 0 | Receive interrupt disabled |
1 | Receive interrupt enabled |
You should only write bit 7 with this call (and really should be using OS_Byte 2). The value can also be read with OS_Byte 192.
The default value for bits 2-4 is stored in OS_Byte CMOS 16.