_bios_serialcom Sends and Receives Single Character DataLast reviewed: July 17, 1997Article ID: Q47987 |
5.10 6.00 6.00a 6.00ax 7.00 | 1.00 1.50
MS-DOS | WINDOWSkbprg The information in this article applies to:
SUMMARYIn the Microsoft C online help and run-time library reference documentation, _bios_serialcom() is documented as taking an unsigned integer as the data. Even though an unsigned integer is large enough for two characters, only one character can be sent or received with each call to _bios_serialcom().
MORE INFORMATIONThe _bios_serialcom() function sends (and receives) character data. Two characters cannot be sent (or received) with one call because the function call is a simple interface to the BIOS interrupt 0x14. This interrupt expects the data to be sent (or received) to be in the AL register (an 8- bit register). Therefore, the data is limited to 8 bits, even though the function requires an unsigned integer as the data parameter. The parameter is an unsigned integer because the _bios_serialcom() function also uses the data parameter in initialization and status checks. In the send (and read) functions of the interrupt, however, only a single byte in the low-order 8 bits of the unsigned integer passed as the data parameter are sent. For more information, see interrupt 0x14 in "IBM ROM BIOS" by Ray Duncan. This book clarifies the interrupt calls that are being made, and what is actually passed to the machine. For more details on serial-communication programming in C, see the "C Programmer's Guide to Serial Communications" by Joe Campbell.
|
Additional reference words: kbinf 1.00 1.50 5.10 6.00 6.00a 6.00ax 7.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |