# Serial communications This unit allows transmission of data through PC's COM1 port (yes, for now it's hardcoded. It's even hardcoded to 115200 bauds 8N1). It provides a stream [io/core] through the "com1wr/com1rd" pair, through which you can read and write to the serial line. These are never closed. This driver uses the interrupt mechanism of the underlying UART 16550 to receive characters in a timely manner without skipping one. When you read from the stream, you in fact read from the internal buffer [io/roll] of characters already received from the UART and handled in IRQ4, the IRQ on which COM1 is hooked on a PC. Sending characters is not buffered. We're waiting for the UART to be ready to receive a character, then send it. To use it, initialize it with "com$" then start reading and writing on "com1rd" and "com1wr". ## API ### Constants BUFSZ 512. Size of the internal buffer. com1rd A reader that reads COM1 com1wr A writer that writes to COM1 ### Words com$ ( -- ) Initializes COM1 to 115200 bauds 8N1.