SIO Technical Reference Manual Copyright (c) 1995 by Raymond L. Gwinn 26 Tanager Place Beckley, West Virginia 25801 All Rights Reserved June 26, 1996 CompuServe: 71154,575 InterNet: ray@gwinn.com Voice: 1-304-255-7900 FAX: 1-303-255-7902 BBS: 1-304-255-7903 or vmbbs.gwinn.com WEB http://www.gwinn.com INTRODUCTION Documentation of software is often more difficult than writing the program itself (at least it is for this author). I will do my best though. But who do I document for? The user that is setting up a BBS just wants to get SIO installed and to move on to more important things. The user that is having problems needs information about serial I/O communications in general and the PC specifically. The application developer (programmer) needs detailed information about each individual function and the information generated. The answer is, more than one manual is needed. This manual is intended as a reference for use by application programmers that desires to use SIO. A separate Users Manual is included in the distribution file(s). This manual and the software described is provided as is and with no guarantees. Use at your own risk. ii WHAT IS SIO . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 DISTRIBUTION, ORDERING AND SUPPORT . . . . . . . . . . . . . . . 2 Distribution and Ordering . . . . . . . . . . . . . . . . . 2 SIO Distribution and Support BBS . . . . . . . . . . . 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 OS/2 Vendor Forum on CompuServe . . . . . . . . . . . . . . . . . . . . 2 Updates . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Development and Debugging Tools . . . . . . . . . . . . . . . . . 4 The Poor Man's Line Monitor (PMLM.EXE) . . . . . . . . . . . 4 VIEWPMLM.EXE . . . . . . . . . . . . . . . . . . . . . . . . 5 SIO's Utility (SU.EXE) . . . . . . . . . . . . . . . . . . . 5 IRQs that currently free for use . . . . . . . . . . . 5 File System Requests . . . . . . . . . . . . . . . . . . . . . . 6 Driver Initialization . . . . . . . . . . . . . . . . . . . 6 Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Input Status . . . . . . . . . . . . . . . . . . . . . . . . 6 Input Flush . . . . . . . . . . . . . . . . . . . . . . . . 7 Write . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Output Status . . . . . . . . . . . . . . . . . . . . . . . 7 Output Flush . . . . . . . . . . . . . . . . . . . . . . . . 7 Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Initial Open . . . . . . . . . . . . . . . . . . . . . 7 Additional Open . . . . . . . . . . . . . . . . . . . . 8 Close . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Intermediate Close . . . . . . . . . . . . . . . . . . 8 Last Close . . . . . . . . . . . . . . . . . . . . . . 8 Device I/O Control (IOCtl) Commands . . . . . . . . . . . . . . . 9 IOCtl Functions From a DOS Session . . . . . . . . . . . . . 10 41h - Set Bit Rate . . . . . . . . . . . . . . . . . . . . . 11 42h - Set Line Characteristics . . . . . . . . . . . . . . . 12 43h - Extended Set Bit Rate . . . . . . . . . . . . . . . . 13 44h - Transmit Byte Immediate . . . . . . . . . . . . . . . 14 45h - Set Break Off . . . . . . . . . . . . . . . . . . . . 14 46h - Set Modem Control Signals . . . . . . . . . . . . . . 15 47h - Hold Transmit . . . . . . . . . . . . . . . . . . . . 16 48h - Start Transmit . . . . . . . . . . . . . . . . . . . . 16 4Bh - Set Break on . . . . . . . . . . . . . . . . . . . . . 17 53h - Write Device Control Block (DCB) . . . . . . . . . . 17 54h - Write Extended Mode Parameters . . . . . . . . . . . . 20 61h - Query Current Bit Rate . . . . . . . . . . . . . . . . 21 62h - Query Line Characteristics . . . . . . . . . . . . . . 21 63h - Query Extended Bit Rate . . . . . . . . . . . . . . . 22 64h - Query SIO Status . . . . . . . . . . . . . . . . . . . 23 65h - Query Transmit Data Status . . . . . . . . . . . . . . 24 66h - Query Current Modem Output Control Signals . . . . . . 25 67h - Query Current Modem Input Signals . . . . . . . . . . 25 68h - Query Number of Characters in Receive Buffer . . . . . 26 6Dh - Query SIO Error . . . . . . . . . . . . . . . . . . . 27 72h - Query SIO Event Information . . . . . . . . . . . . . 28 iii 73h - Read Device Control Block (DCB) . . . . . . . . . . . 29 74h - Read Enhanced Mode Parameters . . . . . . . . . . . . 29 Differences between SIO/VSIO and COM/VCOM . . . . . . . . . . . . 30 Appendix A, Hardware Port and IRQ Assignments . . . . . . . . . . 31 Addresses and IRQs for COM1 and COM2 . . . . . . . . . . . . 31 Defacto standard for COM3 and COM4 . . . . . . . . . . . . . 31 Addresses and IRQ for COM3 through COM8 on the PS/2 . . . . 31 Appendix B, SIO Chips . . . . . . . . . . . . . . . . . . . . . . 32 8250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 8250A . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 16450 . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16C451 . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550 (Non A) . . . . . . . . . . . . . . . . . . . . . . . 33 16550A . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550AF . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550AFN . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550s Made by Western Digital . . . . . . . . . . . . . . . 34 16C551 . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 16C552 . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 16C554 . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 82510 . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 16650 . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ComBic . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Appendix C, Multi-Port Serial I/0 Cards . . . . . . . . . . . . . 37 Hayes ESP . . . . . . . . . . . . . . . . . . . . . . . . . 37 ESP in Compatibility Mode . . . . . . . . . . . . . . . 37 Telcor Tport . . . . . . . . . . . . . . . . . . . . . . . . 37 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Gtek BBS550 . . . . . . . . . . . . . . . . . . . . . . . . 38 Neotech Quad Serial (MCA bus) . . . . . . . . . . . . . . . 38 Appendix D, Advanced SIO Options . . . . . . . . . . . . . . . . 40 Protection . . . . . . . . . . . . . . . . . . . . . . . . . 40 Locked Baud Rate . . . . . . . . . . . . . . . . . . . . . . 40 IRQ Reflection to DOS Process . . . . . . . . . . . . . . . 40 I/O Port Mapping to DOS Process . . . . . . . . . . . . . . 40 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 1 WHAT IS SIO SIO is a Serial Input/Output (SIO) communications character device driver. It provides an interface between application programs and the serial communications hardware. SIO had been designed as a high performance replacement for the OS/2 device driver COM.SYS. This manual documents the known differences between COM.SYS and SIO.SYS. SIO only works with 8250 (type) serial I/O devices. Such devices include, but is not limited to the 8250A, 16450, 16550, 16550A and the 82510. If you have a PC that is an IBM or near compatible which has a serial communication port, it is likely that it contains one of these devices. SIO will identify the type of serial devices that it finds at load time. Like other Device Drivers, SIO will do very little standing alone. There must be an application(s) program that makes use of SIO's functions before one will benefit from the use of SIO. 2 DISTRIBUTION, ORDERING AND SUPPORT Distribution and Ordering The entire package collectively known as SIO is ShareWare. It is not free software or freeware. See LICENSE.TXT and ORDER.TXT for additional information. The ShareWare version of SIO is distributed electronically. One may check their favorite electronic hangout for the latest version of SIO. The latest copy of the ShareWare version is always posted for downloading from the BBS at 1-304-255-7903 or vmbbs.gwinn.com and www.gwinn.com. Registered versions of SIO are distributed by US Mail and electronically from the SIO Distribution and Support BBS. Users desiring to register electronically, may call the BBS and register on line (1-304-255-7903 or vmbbs.gwinn.com) and www.gwinn.com, and immediately download their registered version of SIO. Use the ORDER command at the main BBS prompt. Registrations/Orders can also be placed by phone, mail, FAX, and email. See the front cover of this manual for the phone numbers and addresses. Also see ORDER.TXT for and order form that may be used. Support Extensive testing has been done to insure that this product works on the widest possible range of OS/2 V2 (and up) systems. In most cases, problems can be resolved by reading this manual carefully. Support is provided in section 4 of the OS/2 Vendor Forum on CompuServe (GO OS2BVEN). Section 4 of the OS2BVEN Forum is dedicated to the support of SIO. In addition, support is provided by BBS, Email and FAX. Voice support would overwhelm the author and is not available. If, after reading the manual carefully, you are unable to resolve a problem, you may submit a problem report to one of the following: Email CompuServe 71154,575 Internet ray@gwinn.com FAX 1-304-255-7902 BBS 1-304-255-7903 or vmbbs.gwinn.com Users should note that Support does not always result in a correction of a problem. In addition, the support provided is support of SIO, and not the applications that use SIO. Questions and/or problems about applications programs (such as terminal or FAX programs) should be directed to the available support for the application. 3 Updates In general, updates/upgrades of SIO are free of charge for all releases of SIO with the same major version number. However, there may be a handling charge if the user requires the upgrade to be mailed or emailed. Registered users of SIO can update to the latest version FREE of charge using the BBS and its UPDATE command. Be sure to have your SIO serial number when you first log onto the BBS. All variations (number of ports) of SIO are available for immediate download from the BBS by registered users. Users that have a registered copy of SIO can also use REREG.EXE to transfer the registration information to a new version of SIO. Simply unzip the new SIO files into a temporary directory, change to that directory, execute REREG and answer the questions. After doing the above, all of the files in the temporary directory will have been registered. You must then copy all the SYS and EXE files from the temporary directory to their normal directory (overlaying the old registered version) or execute the SIO install program (INSTALL.EXE). Then you must reboot. You may also want to check your CONFIG.SYS for the path of the SIO/VSIO being loaded and make sure both the new ones are being loaded. If REREG will not transfer your registration information from a previous version of SIO to the new version, then an upgrade must be ordered on disk or obtained from the support BBS. 4 Development and Debugging Tools The Poor Man's Line Monitor (PMLM.EXE) PMLM is basically of interest to developers of comm applications and those providing technical support for those applications. This SIO utility is released largely (in self defense) in the hope that some users can diagnose their own problems. PMLM's feature of saving trace information to disk will only work with registered and beta versions of SIO. PMLM provides basic line monitoring for OS/2, DOS and Windows comm programs. All characters sent or received by application programs are displayed in the upper portion of the screen. Receive characters are displayed as "white on blue" and transmitted characters are displayed "yellow on violet". Line signals, such as CTS are displayed as "dim white on red" when turned off and "bright white on red" when turned on. In addition, a signals transition to OFF is displayed in lower case and a signals transition to ON is displayed in upper case. Status information is displayed in the lower part of the screen. A bright white display means the signal is on, a dim white indicates that the signal is off. In addition, when bright, Rxoff and Txoff indicate the SIO has sent (Txoff) or received (Rxoff) an Xoff, and an Xon is pending. When a DOS or Windows session uses a comm port, an additional line of signal status appears. This status line shows the state of the virtual UART's signals. Only the signals which MAY be different from the real UART's signals are shown. "Rx Chars" and "Tx Chars" reflects the number of characters in SIO's receive and transmit buffers respectively. The last line on the screen shows the keys (from the keyboard) that PMLM will recognize. The bright character shows the key to hit for the associated function. The font keys will not work in a windowed OS/2 session. PMLM's command line requires one parameter, the comm port number, and optionally accepts an additional parameter giving a save trace file name. For example, PMLM 1 COM1INFO.TEC will monitor COM1 and save ALL of the communications traffic in the file COM1INFO.TRC. The trace files created by PMLM contain exactly the same information that is displayed by PMLM, video attributes and all. 5 VIEWPMLM.EXE may be used to view trace files created by PMLM. VIEWPMLM.EXE requires one parameter, the trace file name. The user can use the keys UP, DOWN, PAGEUP, PAGEDOWN, HOME, and END to navigate the saved trace file. Registered SIO users may send VIEWPMLM.EXE (along with saved trace files) to anyone for technical support purposes. VIEWPMLM can be used in native DOS, in DOS sessions under OS/2, and in OS/2 sessions. This means that even those developers and support people need not have OS/2 to view the captured communications data created by PMLM. SIO's Utility (SU.EXE) This utility program has several useful commands. You can obtain a list of the available commands by typing SU at any command line prompt without any parameters. One very useful command is SU IRQS. This command will show IRQs that currently free for use. Commands are provided allowing user control (missing from MODE) are available. Status commands provide a wealth of diagnostic information. 6 File System Requests SIO processes all file system requests made to it in one way or another. The following file system requests and how SIO processes them may be of use to the application programmer. INIT Driver initialization. Read Data transfer from driver to program. Input Status Get input status. Input Flush Terminate all pending input requests. Write Data transfer from program to driver. Output Status Get output status. Output Flush Terminate all pending output requests. Open Open the device for use. Close Close the device. IOCTL Device I/O control commands. Each of these file system requests are discussed in more detail in the following. Driver Initialization During device driver initialization the command line is parsed, memory for data and control buffers is allocated and the system environment is examined. Buffers are allocated for the maximum number of ports that the installed version of SIO can support (up to 16). The mouse port is determined and if it is a serial mouse, that port is excluded from use by SIO. In the absence of any command line parameters, SIO will only support (look for) COM1 and COM2 at the standard addresses. COM3 and up will not be supported (or looked at) unless they are specifically identified in the SIO command line. Read If another read is already in progress, the process issuing the additional read is blocked (suspended) until the previous read command completes. When a read is started, that read is not interrupted by additional reads. If multiple reads are issued, they are not necessarily processed in the order they were issued. Thus, applications may not see the read requests complete in the order in which they were issued. The conditions that control when the read will complete are controlled by the active (current) DCB when the read is started. Input Status This function returns with "device busy" set if there is no data in the receive buffer. That is, busy is returned if the process may be blocked if the application issues a read command. 7 Input Flush This function causes the receive buffer to be cleared (made empty). Any threads that are blocked, waiting for a read, will be restarted when this function is issued. Write If another write is already in progress, the process issuing the additional write is blocked (suspended) until the previous write command completes. When a write is started, that write is not interrupted by additional writes. If multiple writes are issued, they are not necessarily processed in the order they were issued. Thus, applications may not see the write requests complete in the order in which they were issued. The conditions that control when the write will complete are controlled by the current DCB when the write is started. Output Status This function returns with "device busy" set if the output buffer is more than three quarters full. That is, busy is returned if the process may be blocked if the application issues a write command. Output Flush This function causes the transmit buffer to be cleared (made empty). Any threads that are blocked, waiting for a write, will be restarted when this function is issued. Open There are basically two kinds of open. They are an Initial Open and Additional (shared) Opens. The IBM documentation calls the initial open a First Level Open. An Initial Open is an open that occurs when no other process has the communications port open. An Additional Open is when an open occurs and another process already has the communications port open. For an Additional Open to occur, the Initial Opener must have issued an open allowing shared access to the port. Initial Open The IRQ associated with the comm port is claimed (taken) when the Initial Open occurs. If the associated IRQ is not available a "Port in Use" error is returned. At the time of this writing, the IRQ is claimed allowing sharing. However, the shared IRQ claiming is done to circumvent anomalies in the OS, and in actuality SIO will not concurrently share an IRQ with another device driver. The author found it necessary to claim (reset) all interrupts directed to the interrupt service routine in order to prevent lock ups of a 8 communications port. The IRQ mess may be cleaned up at a future date when the OS problems are corrected. During Initial Opens, DTR and RTS are set in accordance with the current Device Control Block (DCB) settings. If DTR Control Mode is the "Enabled" option ( bits 1 and 0 of the DCB Flags1 byte equal 01), then DTR is turned on. Otherwise, DTR is unchanged by the Initial Open. Similarly, if RTS Control Mode is the "Enabled" option ( bits 7 and 6 of the DCB Flags1 byte equal 01), then RTS is turned on. Otherwise, RTS is unchanged by the Initial Open. The following actions also occur during an Initial Open: The Xon and Xoff characters are set to 11h and 13h respectively. The transmit and receive buffers and structures are cleared and re-initialized. Status bits are reset. If the Initial Opener is an OS/2 process (not a DOS process) then the Read time out processing is set to "Normal" in the current DCB. Additional Open A count of active opens is incremented. No changes are made to current comm settings. Close There are two basic kinds of closes. They are an Intermediate Close and a Last Close. Intermediate Close An intermediate close occurs when a process issues a close and other processes still have the communications port opened. This type of close simply decrements an open count and returns. No action or changes take place at the communications port. Last Close The last close occurs when a process issues a close and no other process has the communications port open. If there are any writes pending or incomplete, the process is blocked (suspended) until the writes complete or time out. If 60 seconds pass with no activity at the communications port, the port is forced to close and all writes are terminated. If any processes are blocked (suspended) waiting on a read, they are forced to return to the process that issued the read. If either DTR Control Mode or RTS Control Mode are set to "Enabled" by the current DCB, then the appropriate signal(s) is turned off. Finally, the IRQ is released back to the OS. 9 Device I/O Control (IOCtl) Commands The following Generic IOCtl functions are supported by SIO. 41h - Set Bit Rate 42h - Set Line Characteristics 43h - Extended Set Bit Rate 44h - Transmit Byte Immediate 45h - Set Break Off 46h - Set Modem Control Signals 47h - Hold Transmit 48h - Start Transmit (after hold) 4Bh - Set Break On 53h - Write Device Control Block (DCB) 54h - Write Extended Mode Parameters 61h - Query Current Bit Rate 62h - Query Line Characteristics 63h - Query Extended Bit Rate 64h - Query SIO Status 65h - Query Transmit Data Status 66h - Query Current Modem Output Control Signals 67h - Query Current Modem Input Signals 68h - Query Number of Characters in Receive Buffer 69h - Query Number of Characters in Transmit Buffer 6Dh - Query SIO Error 72h - Query SIO Event Information 73h - Read Device Control Block (DCB) 74h - Read Enhanced Mode Parameters Each of these IOCtl commands are described in detail on the following pages. 10 All IOCtl functions are called with a uniform set of parameters. This uniform set of parameters is: DWORD Address of a data packet. WORD Size of the data packet in bytes. DWORD Address of the parameter packet. WORD Size of the parameter packet in bytes. WORD Function code. WORD Category code (01 for SIO). WORD Handle for the opened device. Each IOCtl function may or may not have a data or parameter packet. If a given IOCtl function specifies a NULL parameter or data packet, the address of the appropriate item must be NULL (zero) in the parameters. Passing an invalid data or parameter packet may result in a General Protection Fault. IOCtl Functions From a DOS Session Additionally the following describes how to call an IOCtl function in an OS/2 driver from a DOS session (VDM). The "handle" is obtained simply by issuing a normal DOS open of the device, ie COM1. The Data Packets (DataPkt below) and Parameter Packets (PrmPkt below) are different for each IOCtl function. The structure and contents of these packets are described in the following pages. push ds ;save ds mov bx,handle ;file handle to bx mov ch,1 ;category, 1=serial device control mov cl,41h ;func code, 41h=extended set bit rate mov dx,Seg DataPkt ;get segment of the data packet mov ds,dx ;load ds with seg of the data packet lea dx,DataPkt ;data packet address to ds:dx mov si,Seg PrmPkt ;segment of command packet to si lea di,PrmPkt ;offset of command packet to di mov ax,440ch ;IOCtl function call, handle based int 21h ;issue IOCtl to OS/2 driver. pop ds ;restore ds jc error ;jump if error returned 11 41h - Set Bit Rate Parameter Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Bit/Baud Rate ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "Bit Rate" is any number from 1 to 65535. SIO does not attempt to validate a given bit rate. The minimum bit rate accepted by SIO is 50, the maximum for this IOCtl function is 65535. Note that the hardware may not be able to generate the given bit rate. For example, if a computer has a standard communications card installed and if a bit rate of 65500 is specified, the nearest bit rate that can be generated will be set, 57600 in this case. To set bit rates in excess of 57600, see IOCtl function 43h, Extended Set Bit Rate. Some commonly used bit rates that can be set with this function are: 50 2000 75 2400 110 3600 150 4800 300 7200 600 9600 1200 19200 1800 28800 2000 38400 2400 57600 Data Packet - None 12 42h - Set Line Characteristics Parameter Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Data Bits Per Character ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Parity Setting ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Stop Bit Setting ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ Data Bits Per Character may be 5, 7, or 8, all other values are invalid. Parity Setting may have the following values, all other values are invalid: 0 - No parity bit. 1 - Odd parity. 2 - Even parity. 3 - Mark parity (1). 4 - Space parity (0). Stop Bit Setting may have the following values, all other values are invalid: 0 - 1 stop bit. 1 - 1.5 stop bit (valid with 5 data bit characters). 2 - 2 stop bits. Data Packet - None 13 43h - Extended Set Bit Rate Parameter Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Bit/Baud Rate ³ DWORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Fraction ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "Bit Rate" is the desired bit/baud rate. The maximum bit rate supported by SIO is determined by the installed hardware. The IOCtl function "63h - Query Extended Bit Rate" can be used to determine the maximum bit rate allowed for the associated hardware. SIO does not attempt to validate a given bit rate. This means that the hardware may not be able to generate the given bit rate. For example, if a computer has a standard communications card installed and if a bit rate of 65500 is specified, the nearest bit rate that can be generated will be set, 57600 in this case. "Fraction" is used to set the fractional part of the bit rate when a high degree of accuracy is needed. As of this writing, SIO does not support a "Fraction" other than zero. Some commonly used bit rates that can be set with this function are: 110 3600 115200 150 4800 230400 300 7200 600 9600 1200 19200 1800 28800 2000 38400 2400 57600 Data Packet - None 14 44h - Transmit Byte Immediate Parameter Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Character to Transmit ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "Character to Transmit" will be the next character loaded into the UART for transmission. If a previous transmit immediate byte is still pending, it is lost. This function does not wait for the character to transmit before returning. This function may be used by an application program as one of a set of functions to implement its own Xon/Xoff type handshaking. Data Packet - None 45h - Set Break Off Parameter Packet - None Look!! No Parameter Packet! Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ SIO Error Word ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ See function 6Dh "Query SIO Error" for a description of the SIO Error Word. This function does not reset any bits in the SIO Error Word. 15 46h - Set Modem Control Signals Parameter Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ DTR and RTS on mask ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ DTR and RTS off mask ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ Attempted changes in the the setting of signals that are used as flow control signals are ignored. The current DCB determines if either or both RTS and DTR are used as a flow control signal. The setting of bit 0 affects DTR and the setting of bit 1 affects RTS. Ones in the "on mask" specifies which of the two signals are to be turned on, and zeros in the "off mask" specify which of the two signals are to be turned off. Some examples are: On Mask Off Mask 01h 0FFh Turn DTR on 00h 0FEh Turn DTR off 02h 0FFh Turn RTS on 00h 0FDh Turn RTS off 03h 0FFh Turn RTS and DTR on 00h 0FCh Turn RTS and DTR off If both on and off are specified for the setting of a signal, the result is undefined. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ SIO Error Word ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ See function 6Dh "Query SIO Error" for a description of the SIO Error Word. This function does not reset any bits in the SIO Error Word. 16 47h - Hold Transmit Parameter Packet - None Data Packet - None This function will disable the transmitter. The transmitter will not be enabled again unless IOCtl function 48h is issued. If the transmitter is already disabled, this call has no effect. This function can be used as part of a set that allows an application to implement its own Xon/Xoff type handshaking. Note that this is different from how COM.SYS implements this function. COM.SYS will re-enable the transmitter if an Xon is received while SIO will not. 48h - Start Transmit Parameter Packet - None Data Packet - None This function will enable the transmitter, usually following an IOCtl function 47h. If the transmitter is already enabled, this call has no effect. This function can be used as part of a set that allows an application to implement its own Xon/Xoff type handshaking. 17 4Bh - Set Break on Parameter Packet - None Look!! No Parameter Packet! Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ SIO Error Word ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ See function 6Dh "Query SIO Error" for a description of the SIO Error Word. This function does not reset any bits in the SIO Error Word. 53h - Write Device Control Block (DCB) This is where the action is! See also function 73h (Read DCB). Parameter Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Write Timeout ³ WORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Read Timeout ³ WORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Flags1 ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Flags2 ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Flags3 ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Error Replacement Byte ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Break Replacement Byte ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Xon Character ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Xoff Character ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "Write Timeout" The write timeout is given in hundredths of a second, relative to zero. That is, 0 specifies 0.01 seconds and 1 specifies 0.02 seconds. "Read Timeout" The read timeout is given in hundredths of a second, relative to zero. That is, 0 specifies 0.01 seconds and 18 1 specifies 0.02 seconds. "Flags1" is a bit flag. The bits in the flag specify the following: Bits 1 and 0 DTR Control Mode. 00 - Disable changing DTR during Open and Close. 01 - Enable Changing DTR during Open and Close. 10 - DTR used for input handshaking (not supported by SIO). 11 - Invalid Bit 2, Must be zero Bit 3, Off to ignore CTS. Forced on if RTS is handshake. Bit 4, DSR is handshake. Not supported by SIO. Bit 5, DCD required to transmit. Not supported by SIO. Bit 6, DSR required to receive. Bit 7, Must be zero. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ "Flags2" is a bit flag. The bits in the flag specify the following: Bit 0, SIO is to honor Xon/XOff received from remote. Bit 1, SIO may send Xon/Xoff to the remote. Bit 2, Enable error replacement character. Not supported by SIO. Bit 3, Enable null stripping. Not supported by SIO. Bit 4, Enable break replacement character. Not supported by SIO. Bit 5, Enable Full duplex. Half duplex is not supported by SIO. Bits 7 and 6 RTS Control Mode 00 - Disable changing RTS during Open and Close. 01 - Enable Changing RTS during Open and Close. 10 - RTS used for input handshaking. 11 - Toggle on transmit (half duplex). Not supported by SIO. 19 "Flags3" is a bit flag. The bits in the flag specify the following: Bit 0, Enable infinite write timeout processing. When set, a write timeout will not occur. Bits 2 and 1 Read timeout processing 00 - Invalid. 01 - Normal read time out. 10 - Wait for something. Reads will return before a timeout occurs if something received. 11 - No Wait. Reads will return immediately with any available data. Bits 4 and 3 FIFO Control 00 - No change in FIFO state. 01 - Disable FIFO buffers. 10 - Enable FIFO buffers. 11 - Dynamic enabling and disabling of FIFOS. **Note, SIO forces bits 4 and 3 to "10". Bits 6 and 5 Set receive trigger level 00 - 1 character. 01 - 4 characters. 10 - 8 characters. 11 - 14 characters. **Note, SIO forces bits 6 and 5 to "10". Bit 7 Transmit load count 0 - Load 1 character. 1 - Load 16 characters. **Note, SIO forces bit 7 to "1". "Error Replacement Byte" Not supported by SIO. "Break Replacement Byte" Not supported by SIO "Xon Character" Any value, default is 11h. "Xoff Character" Any value, default is 13h. Data Packet - None 20 54h - Write Extended Mode Parameters Parameter Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Enhanced Flags1 ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Reserved ³ DWORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ This function is not supported (ignored) by SIO. However the bits are defined here for completeness. Enhanced Flags1 Bit 0 - Enhanced mode hardware available (Query only 74h). Bit 1 - Enable enhanced mode. Bits 3 and 2 DMA Receive Operation 00 - Disable DMA receive capability. 01 - Enable DMA receive capability. 10 - Dedicate a DMA channel to receive. 11 - Reserved. Bits 5 and 4 DMA Transmit Operation 00 - Disable DMA transmit capability. 01 - Enable DMA transmit capability 10 - Dedicate a DMA channel to transmit. 11 - Reserved. Bit 6 - Receive in DMA mode (Query only, 74h). Bit 7 - Transmit in DMA mode (Query only, 74h). Data Packet - None. 21 61h - Query Current Bit Rate Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Bit/Baud Rate ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ See function 41h for more information. 62h - Query Line Characteristics Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Data Bits Per Character ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Parity Setting ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Stop Bit Setting ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Transmitting Break ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ See function 42h for a definition of Data, Parity and Stop Bits. "Transmitting Break" is set to 1 if a break is being transmitted. Otherwise, it is set to zero. 22 63h - Query Extended Bit Rate Parameter Packet - None Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Current Bit/Baud Rate ³ DWORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Fraction of Current ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Minimum Bit/Baud Rate ³ DWORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Fraction of Minimum ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Maximum Bit/Baud Rate ³ DWORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Fraction of Maximum ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "Current Bit/Baud Rate" is a 32 bit integer defining the current bit rate. "Fraction of Current" is always 0 when returned by SIO. "Minimum Bit/Baud Rate" is the minimum value that can be passed to SIO as a bit/baud rate. "Fraction of Minimum" is always 0 when returned by SIO. "Maximum Bit/Baud Rate" is the maximum value that can be passed to SIO as a bit/baud rate. "Fraction of Maximum" is always 0 when returned by SIO. 23 64h - Query SIO Status Parameter Packet - None Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ SIO Status Byte ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "SIO Status Byte" is a bit flag. The bits have the following meanings: Bit 0 - Set if SIO is waiting for CTS before transmitting. Bit 1 - Set if SIO is waiting for DSR before transmitting. Bit 2 - Set if SIO is waiting for DCD before transmitting. Bit 3 - Set if SIO is waiting because Xoff received or transmitter is disabled (see function 47h). Bit 4 - Reserved, not used by SIO. Bit 5 - Set if SIO is waiting because break is being sent. Bit 6 - Set if a transmit immediate is pending. Bit 7 - Reserved, not used by SIO. 24 65h - Query Transmit Data Status Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Transmit Status ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "SIO Status Byte" is a bit flag. The bits have the following meanings: Bit 0 - Set if write in progress or pending. Bit 1 - Set if any data is in the transmit buffer. Bit 2 - Set if UART is currently transmitting. Bit 3 - Set if a transmit immediate is pending. Bit 4 - Set if an Xon needs to be sent. Bit 5 - Set if an Xoff needs to be sent. Bit 6 - Reserved Bit 7 - Reserved 25 66h - Query Current Modem Output Control Signals Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Modem Output Signals ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "Modem Output Signals" is a bit flag. The bits have the following meanings: Bit 0 - Set if DTR is currently on. Bit 1 - Set if RTS is currently on. Bits 2-7 Reserved, set to zero by SIO. 67h - Query Current Modem Input Signals Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Modem Input Signals ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "Modem Output Signals" is a bit flag. The bits have the following meanings: Bits 0-3 Reserved, set to zero by SIO. Bit 4 - Clear To Send (CTS) is active. Bit 5 - Data Set Ready (DSR) is active. Bit 6 - Ring Indicator (RI), trailing edge detected. Bit 7 - Data Carrier Detect (DCD) is active. 26 68h - Query Number of Characters in Receive Buffer Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Number of Bytes Buffered ³ WORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Byte Size of the Buffer ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ Self explaining. 69h - Query Number of Characters in Transmit Buffer Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Number of Bytes Buffered ³ WORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Byte Size of the Buffer ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ Self explaining. 27 6Dh - Query SIO Error Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ SIO Error Word ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "SIO Error Word" is a bit flag. The bits have the following meaning: Bit 0 - Set if a buffer overrun has occurred. Bit 1 - Set if an overrun occurred at the UART. Bit 2 - Set if the UART detected a parity error. Bit 3 - Set if the UART detected a framing error. Bits 4-15 Reserved, set to zero by SIO. All bits of the SIO Error Word are reset prior to returning to the caller. 28 72h - Query SIO Event Information Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ SIO Event Word ³ WORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ "SIO Event Word" is a bit flag. The bits have the following meaning: Bit 0 - Set when a receive character is transferred from the UART to the receive buffer. Bit 1 - Set when a receive (Read) timeout occurs. Bit 2 - Set if the transmit buffer is empty. Bit 3 - Set if Clear To Send (CTS) has changed state. Bit 4 - Set if Data Set Ready (DSR) has changed state. Bit 5 - Set if Data Carrier Detect (DCD) has changed state. Bit 6 - Set if a break has been detected. Bit 7 - Set if a framing, parity, or overrun error has occurred. Bit 8 - Set if trailing edge of Ring Indicator (RI) has occurred. Bits 9-15 Reserved, set to zero by SIO. All bits are reset prior to returning to the caller. 29 73h - Read Device Control Block (DCB) Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Write Timeout ³ WORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Read Timeout ³ WORD ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Flags1 ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Flags2 ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Flags3 ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Error Replacement Byte ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Break Replacement Byte ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Xon Character ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Xoff Character ³ BYTE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ See function 53h for a description of the parameters. 74h - Read Enhanced Mode Parameters Parameter Packet - None. Data Packet ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Item Type ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ ³ Enhanced Flags1 ³ BYTE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ Reserved ³ DWORD ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ See function 54h for a description of the Flags1 Byte. 30 Differences between SIO/VSIO and COM/VCOM What follows is some of the differences between SIO/VSIO and COM/VCOM that are known to the author. 1 - COM.SYS will automatically seek out and support four comm ports, COM1 through COM4. SIO.SYS will automatically seek out and support only COM1 and COM2. If SIO.SYS is to support more than two comm ports, they must be defined in the command line that loads SIO.SYS. For example, DEVICE=SIO.SYS (COM3) (COM4) will cause SIO.SYS to support four comm ports. 2 - In the absence of overrides in the command line, COM.SYS will seek out four comm ports in the sequence of I/O ports 3F8h, 2F8h, 3E8h and 2E8h. The first port found in this sequence is given the logical name COM1, the second is COM2 etc. This means that the comm port at 2F8h could become COM1. In the opinion of the author, this confuses some users to frustration. With no command line overrides, SIO.SYS uses a fixed I/O port concept. That is, COM1 is always at I/O port 3F8h, COM2 is always at 2F8h, etc. Another way of looking at this is; if no comm port exists at port 3F8h, then you do not have a COM1. SIO.SYS will not move another (found) comm port into the logical COM1 slot. 3 - VSIO opens a comm port for a DOS session with sharing allowed. VCOM uses an "exclusive use" open for DOS sessions. 4 - SIO.SYS will accept any number from 50 up as a valid baud rate. For example, if an application program attempts to set a baud rate of 9990 bps, COM.SYS will reject it and SIO.SYS will accept it. 5 - SIO/VSIO execute faster than COM/VCOM. This means that some applications, that are timing dependent, may not work under SIO/VSIO that do work under COM/VCOM. 6 - SIO/VSIO provides more reliable active flow control for DOS sessions. For example, if RTS/CTS handshaking is in use, VSIO virtualizes the RTS settings by the DOS program while SIO completely controls the real RTS signal. COM/VCOM simply passes the RTS signal directly to the hardware. 7 - COM.SYS will block an application until a write completes. SIO will return to the application program immediately if all of the write data will fit into SIO's internal buffers. 31 Appendix A, Hardware Port and IRQ Assignments I have obtained the following information from various sources. Accuracy is not guaranteed. In fact, nothing in this document is guaranteed. Addresses and IRQs for COM1 and COM2 COM1 uses 03F8h and IRQ4 COM2 uses 02F8h and IRQ3 Defacto standard for COM3 and COM4 for PC, XT and AT COM3 uses 03E8h and IRQ4 COM4 uses 02E8h and IRQ3 Addresses and IRQ for COM3 through COM8 on the PS/2 COM3 uses 3220h and IRQ3 COM4 uses 3228h and IRQ3 COM5 uses 4220h and IRQ3 COM6 uses 4228h and IRQ3 COM7 uses 5220h and IRQ3 COM8 uses 5228h and IRQ3 All PCs (known to the author) prior to the PS/2 and EISA only use 10 bits to address hardware I/0 ports. Systems prior to the PS/2 and EISA can not address the standard PS/2 addresses for COM3 through COM8. If an AT or below attempts to address COM3 through COM8 using the PS/2 addresses, only the low 10 bits of the address are used. That is, the high 6 bits of the address will be ignored by the hardware. This means that any reference to COM3 through COM8 will actually address ports 220h through 22Fh on older PCs. One should avoid expansion boards that use ports 220h through 22Fh unless the expansion board is a serial I/O board. SIO will (attempt to) determine the hardware architecture (ISA/EISA and PS/2) that it is being executed on and use the appropriate hardware port addresses for COM1 thru COM4 as defaults. 32 Appendix B, SIO Chips The following is a collection of comments developed from hearsay, random documents, experience, and technical specifications. So, take it with a grain of salt. Order information from the various manufactures if you want accurate information. Very good reference books are available from National Semiconductor Corporation. They cover most of the SIO devices (also called UARTs) that you will find in many PCs and clones. I am not sure that books can be ordered directly from National Semiconductor. They may require that you get it from a distributor. In any case, the address on the back of the one manual is: National Semiconductor Corporation 2900 Semiconductor Drive P.O. Box 58090 Santa Clara, CA 95052-8090 Tel:(408)721-5000 TWX:(910)339-9240 8250 As best I known, the 8250 was the first SIO chip (integrated circuit) that was used by the IBM PC and many clones. In my opinion, it was a poor choice on the part of IBM. I feel many superior devices, at comparable prices, were readily available. At that time, I feel the 8251A or the 8530 would have been better choices. But, they used the 8250 and therefore we must use it. From a hardware standpoint the 8250 is a relatively slow device. It is advisable that programmers not perform successive inputs or outputs to this device. It seems that software programs can load the various registers of the 8250 faster than it can process the information. The 8250 had a total of 7 registers. The specifications state that 56kb is the maximum baud rate. 8250A I believe the 8250A is the 8250 with some bug fixes. I have no idea what the bugs may have been. A quick glance at the specifications shows the speed of the 8250 and 8250A to be much the same. The 8250A added an 8th register. This additional register enables software to detect if an 8250 is installed. The specifications state that 56kb is the maximum baud rate. 33 16450 The 16450 seems to be a speeded up version of the 8250A. There is no direct way (that I know of) for software to detect the difference between an 8250A and a 16450. I believe the 16450 was developed to eliminate the need for software to insert delays between successive accesses to the device. The specifications indicate the 16450 is a much faster device than its predecessors. The additional speed is only the speed at which the processor can access the device. The maximum baud rate for the 16450 is still stated at 56kb. However, I have been told by some people that they have run the 16450 successfully at much higher speeds. I do not believe there was ever a 16450A. 16C451 The 16C451 is a CMOS version of the 16450. CMOS is a term for the material and manufacturing process used to make the part. CMOS typically uses less power than other technologies. If you are not designing hardware, you should view the 16C451 as a 16450. 16550 (Non A) It is hard to find a 16550 (Non A). I was told by National Semiconductor that they did everything they could to get all 16550s back. SIO will detect a 16550 and tell you if you have one. I am told that the 16550 was installed in early PS/2 systems. The 16550 was the first shot at a FIFOed version of the 8250 family from National semiconductor. However, I was told by National Semiconductor that the FIFOs of the 16550 are not reliable and they should not be enabled. SIO will treat a 16550 like a 16450. In this mode, they are reliable. National Semiconductor would not provide me with a specification for the 16550. However, I suspect its maximum baud rate is the same as the 16550A which is 256kb. 16550A, 16550AF and 16550AFN In the manuals that I have, National Semiconductor does not explain the differences between the 16550A and the 16550AF. I suspect the AF part may have a few bug fixes. I believe the N in AFN describes packaging, ceramic versus plastic, DIP versus surface mount etc. In the opinion of the author, there is no substitute for the 16550A (and its successors) in the 8250 type series. The 16550A is compatible with most software written for the entire family of 8250 type devices. Programs that are 16550A aware can provide much improved performance over previous devices. The maximum baud rate for the 16550A is specified at 256kb. However, due to the hardware design of the PC et al, 115kb is the maximum baud rate that can be programmed by software. The 16550A can be plugged into the same socket that contains an 8250, 34 8250A or 16450. If your SIO expansion board has the SIO chips in sockets, you can upgrade to the 16550A by simply removing the old chips and replacing them with 16550As. The key to the performance increase of the 16550A is its FIFOs. It has 16 byte FIFOs for both transmit and receive data. 16550s Made by Western Digital I have been told, but I have not verified for myself, that 16550s made by Western Digital have a problem with their FIFOs when working at 2400 baud or below. 16C551 The 16C551 is a CMOS version of the 16550AF. See the above description of the 16C451 for a discussion of CMOS. Do not feel you need to upgrade from a 16550A or AF to a 16C551. There is no gain from an existing users point of view. 16C552 The 16C552 is two 16C551s on a single chip. 16C554 The 16C554 is four 16C551s on a single chip. 82510 I believe Intel is the only company that manufactures the 82510. The 82510 is feature rich with several modes of operation. Its default mode is to operate as a 16450. The 82510 has a 4 byte FIFO for both transmit and receive data. A 4 byte FIFO is sufficient to provide significant performance over a basic 16450. The 82510 is small in size. Therefore, it is found in many lap tops. The 82510 is somewhat of a sleeper. I believe it would be much more widely used if Intel had promoted it more. However, given a choice between the 82510 and the 16550A, I would select the 16550A. 35 16650 The 16650 by Startech seems a good logical step in the evolution of the 8250 type UARTs. One of the many flavors of the 16650 is a package that is pin compatible with the 40 pin (DIP) 16550s. This means that the 16650 can be placed into the same socket as any 16550, 8250, etc. The 16650 has enhanced the FIFOs to 32 bytes, added on chip flow control ability, and increases the maximum bit rate to 460800. The on chip flow control is a really nice feature. On chip flow control practically eliminates the possibility of missed receive characters. On chip flow control also means that some devices that require immediate attention when it sends Xoff, like the Seiko Label Printer, will work much better in environments like OS/2 and Windows. The 32 byte FIFOs of the 16650 is an improvement over the 16550, but is still a disappointment. I feel that 1k, or larger, FIFOs would have been a much better choice. When I quizzed Startech about this, they replied that the 32 byte FIFOs were chosen to keep the cost down. They added that if the 16650 is successful, they plan a 16750 with larger FIFOs. The 16650 powers up in a 16550 compatible mode, meaning most software written for the 16550 should work. I have discovered a serious incompatibility in the current (Oct 1994) versions of the 16650. All previous UARTS in the 8250 family will issue only a single transmit interrupt if no additional data is sent to the UART. The 16650 on the other hand, will issue continuous transmit interrupts making it necessary to mask the transmit interrupt. I quizzed Startech about this and was told that a new revision of the chip would be available within a few months that would correct this incompatibility. 36 ComBic The ComBic is a very impressive UART used on the Hayes ESP card and some others. The ComBic is basically a 16550 UART with on chip flow control and 1k FIFOs and a maximum bit rate of 921600. Like the 16650, on chip flow control practically eliminates the possibility of missed receive characters. On chip flow control also means that some devices that require immediate attention when it sends Xoff, like the Seiko Label Printer, will work much better in environments like OS/2 and Windows. The ComBic has two modes of operation, compatibility mode and enhanced mode. In compatibility mode, the UART acts as a 16550. However, when in compatibility mode, the 1k FIFOs and on chip flow control can still be used. In enhanced mode, software gains the ability to look into the FIFOs and determine the exact number of bytes loaded. This feature enables software the use block input and output to the ComBic which greatly reduces processor overhead. 37 Appendix C, Multi-Port Serial I/0 Cards I have received many requests for information about multi-port serial I/O card. I will describe the boards that I know about (or have heard about) here. I will add to the list as I receive precise information from manufactures, users, or I develop it myself. Hayes ESP The original ESP (ESP V1) is not supported. The SIO command line must contain the ESP's enhanced I/O port address. For bit rates exceeding 180000bps the IRQ MUST be specified for the master port. For lower data rates NONE may be specified for the IRQ. SIO does not search for the ESP ports as the Hayes drivers do under DOS/Windows. This searching can (will) break things under OS/2. The SIO command line for an ESP at I/O port 180h using IRQ14 would be as follows: DEVICE=path\SIO.SYS (COM1,180,IRQ14) (COM2,188,NONE) If you would like the above reflected to DOS sessions as a standard COM1 and COM2, then use the following command line: DEVICE=path\SIO.SYS (COM1,180:3F8,IRQ14:IRQ4) (COM2,188:2F8,NONE:IRQ3) Note that the numbers after the colons ":" are the address and IRQ of where the port appears to DOS software running under OS/2. Any IRQ specified for an ESP slave port is ignored. For those that like to have a clean looking CONFIG.SYS, SIO will accept NONE as the IRQ specification of an ESP slave port. If you wish to use the ESP in Compatibility Mode, simply specify the base port address that the ESP's compatibility mode is configured for (ie 3F8 when configured for COM1). Telcor Tport The Telcor Tport is supported in both burst mode and 16450 emulation mode. When in burst mode, the Tport's 16k FIFOs are enabled. Additionally in burst mode, no IRQ is used by the Tport. In burst mode, any IRQ specified for the Tport is ignored. For those that like to have a clean looking CONFIG.SYS, SIO will accept NONE as the IRQ specification of a Tport. An example command line defining a Tport card to be used in burst mode; and that is configured for COM1 follows: DEVICE=path\SIO.SYS (COM1,Tport@3F8,NONE:IRQ4) The Tport's 16450 Emulation mode simply uses a normal SIO command line. eg: DEVICE=path\SIO.SYS (COM1,3F8,IRQ4:IRQ4) In both examples the "IRQ4" following the colon above, means that the virtual IRQs are to be sent to a VDM on IRQ4. 38 STB 4COM (ISA bus) I am very impressed with the STB 4COM card, they have almost got it. Yes, it's the same company that makes the VGA cards. The 4COM card uses a 16554 which is the equivalent of four 16550A. Comm ports can use IRQs 2/9, 3, 4, 5, 10, 11, 12, and 15. Any or all ports can share IRQs, and they have done this right. I tested SIO with all four ports of the 4COM on IRQ12 and they worked correctly. The user can select any of the following I/O port address for a comm port: 3F8, 2F8, 3E8, 2E8, 1A8, 1E8, 1F8, 2A8. The 4COM card is priced at $110 and I ordered mine from Prerapture Solutions which can be reached by telephone at 1-919-286-1502 for information and foreign callers. In the US orders can be placed by calling 1-800-735-5266. Their mailing address is: Prerapture Solutions 1806 Albany St. Durham NC 27705-3135 Gtek BBS550 (ISA bus) The Gtek BBS550 is a communications card with the equivalent of 8 16550s (in reality two 16554s) UARTS. Where were these cards 5 years ago! Like the STB 4COM, I am very impressed with the BBS550. It has a wide range of selectable I/O port address, some in the 16 bit range (above 3FFh) which can be very useful. I tested the board with all 8 ports installed using IRQ3 (although I never had more than 3 ports active at the same time). The board performed well using shared IRQs. The BBS550 has 8 RJ-45 connectors (10 pin), 6 of which comes directly off the back of the card. The other two RJ-45 connectors are internal and special cables with grommets are supplier for these 2 ports. The cables supplied with the BBS550 expands the RJ-45 out to standard DB- 25 connectors. Gtek is located in St. Louis Mississippi. Their phone number is 800- 282-4835 or 601-467-8048. Neotech Quad Serial (MCA bus) Well, I just got my first PS/2 system (for testing of SIO) and I am using the NeoTech Quad Serial card in that system. What can I say, it works beautifully and interrupt sharing has never been a problem on MCA systems. This card (as shipped) came with four individual 16450 chips installed, but they were in sockets so I installed 16550 UARTS before I installed the card. The card has one large connector on the back of the card and the supplied cable expands that to 4 standard DB- 25 connectors. Those of you needing a 4 port card for an MCA system contact: Neotech Inc 30295 Solon Industrial Pkwy. Solon, Ohio 44139 Voice (216) 248-4114 39 FAX (216) 248-5701 40 Appendix D, Advanced SIO Options The following is provided for the experienced user. Inexperienced users get themselves into a lot of trouble when trying to use these options and they cause an inordinate number of support problems. Therefore, the following are unsupported options. If you use them, you must work out the problems yourself or ask a friend how they got it working. Protection Placing a dash "-" in the fourth parameter position, eg (COM1,3F8,IRQ4,-), causes SIO not to provide any protection for that port. The OS may still protect the port somewhat. When the dash parameter is used the port is wide open (like DOS) for any process to access it. Locked Baud Rate Placing a colon and a baud rate following the communications port, eg (COM1:38400,3F8,IRQ4), causes the port to be locked at that baud rate. No program, OS2 or DOS, is allowed to change the baud rate. IRQ Reflection to DOS Process Normally the IRQ that is reflected to a DOS process is the same as the actual hardware IRQ. Placing a colon and an additional IRQ following the normal IRQ, eg (COM1,3F8,IRQ12:IRQ4), causes SIO/VSIO to reflect the IRQ to a DOS process on IRQ4 (in this example) even though the real hardware IRQ is IRQ12. If one wishes SIO to automatically locate the hardware IRQ, then the following construct can be used: (COM1,3F8,:IRQ4). Notice that the hardware IRQ is simply NOT specified. I/O Port Mapping to DOS Process Some DOS programs, such as CompuServe's CIM, insist that COM1 be at I/O port 03F8, COM2 at 02F8, etc. On OS/2 systems, comm ports can have any I/O port address as specified by a command line. If COM1 is not at I/O port 03F8 for some DOS programs, then COM1 can not be used by the DOS program. The SIO command line allows the I/O ports to be mapped to a different address for DOS sessions, eg (COM1,FF80:03F8,IRQ12:IRQ4). In this example, the real COM1 is at FF80 on IRQ12, but is reflected to DOS processes on I/O ports 03F8 at IRQ4. It is NOT necessary to map both the I/O port address and the IRQ. When the I/O port is mapped to a DOS session, the UART will appear at BOTH I/O port addresses (FF80 and 03F8 in the given example). 41 Index 16450 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550 (Non A) . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550AF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550AFN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16550s Made by Western Digital . . . . . . . . . . . . . . . . . . 34 16650 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 16C451 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 16C551 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 16C552 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 16C554 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 8250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 8250A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 82510 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Additional Open . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Addresses and IRQ for COM3 through COM8 on the PS/2 . . . . . . . . 31 Addresses and IRQs for COM1 and COM2 . . . . . . . . . . . . . . . 31 Appendix A, Hardware Notes . . . . . . . . . . . . . . . . . . . . 31 Appendix B, SIO Chips . . . . . . . . . . . . . . . . . . . . . . . 32 Appendix C, Multi-Port Serial I/0 Cards . . . . . . . . . . . . . . 37 Appendix D, Advanced SIO Options . . . . . . . . . . . . . . . . . 40 BBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 ComBic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 CompuServe . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 DCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Defacto standard for COM3 and COM4 . . . . . . . . . . . . . . . . 31 Development and Debugging Tools . . . . . . . . . . . . . . . . . . 4 Device Control Block . . . . . . . . . . . . . . . . . . . . . . . 8 Differences between SIO/VSIO and COM/VCOM . . . . . . . . . . . . . 30 Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Driver Initialization . . . . . . . . . . . . . . . . . . . . . . . 6 DTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 DTR Control Mode . . . . . . . . . . . . . . . . . . . . . . . . . 8 Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 ESP in Compatibility Mode . . . . . . . . . . . . . . . . . . . . . 37 Extended Set Bit Rate . . . . . . . . . . . . . . . . . . . . . . . 13 FAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 FIFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 34 File System Requests . . . . . . . . . . . . . . . . . . . . . . . 6 First Level Open . . . . . . . . . . . . . . . . . . . . . . . . . 7 Gtek BBS550 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Hold Transmit . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 I/O Port Mapping to DOS Process . . . . . . . . . . . . . . . . . . 40 Initial Open . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Input Flush . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Input Status . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Intermediate Close . . . . . . . . . . . . . . . . . . . . . . . . 8 IRQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 IRQ Reflection to DOS Process . . . . . . . . . . . . . . . . . . . 40 Last Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Locked Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . 40 National Semiconductor Corporation . . . . . . . . . . . . . . . . 32 42 Neotech Quad Serial . . . . . . . . . . . . . . . . . . . . . . . . 38 Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 OS2BVEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Output Flush . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Output Status . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 PCMCIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 PMLM.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Query Current Bit Rate . . . . . . . . . . . . . . . . . . . . . . 21 Query Current Modem Input Signals . . . . . . . . . . . . . . . . . 25 Query Current Modem Output Control Signals . . . . . . . . . . . . 25 Query Extended Bit Rate . . . . . . . . . . . . . . . . . . . . 13, 22 Query Line Characteristics . . . . . . . . . . . . . . . . . . . . 21 Query Number of Characters in Receive Buffer . . . . . . . . . . . 26 Query Number of Characters in Transmit Buffer . . . . . . . . . . . 26 Query SIO Error . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Query SIO Event Information . . . . . . . . . . . . . . . . . . . . 28 Query SIO Status . . . . . . . . . . . . . . . . . . . . . . . . . 23 Query Transmit Data Status . . . . . . . . . . . . . . . . . . . . 24 Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Read Device Control Block (DCB) . . . . . . . . . . . . . . . . . . 29 Read Enhanced Mode Parameters . . . . . . . . . . . . . . . . . . . 29 RTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 RTS Control Mode . . . . . . . . . . . . . . . . . . . . . . . . . 8 Set Bit Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Set Break Off . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Set Break on . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Set Line Characteristics . . . . . . . . . . . . . . . . . . . . . 12 Set Modem Control Signals . . . . . . . . . . . . . . . . . . . . . 15 SIO Chips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 SIO's Utility (SU.EXE) . . . . . . . . . . . . . . . . . . . . . . 5 Start Transmit . . . . . . . . . . . . . . . . . . . . . . . . . . 16 STB 4COM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Telcor Tport . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Transmit Byte Immediate . . . . . . . . . . . . . . . . . . . . . . 14 UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 VIEWPMLM.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 WHAT IS SIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Write Device Control Block (DCB) . . . . . . . . . . . . . . . . . 17 Write Extended Mode Parameters . . . . . . . . . . . . . . . . . . 20