I got this from Borland's library reference book (watered down for length) for _bios_serialcom if it will be of any use.
Code:
#define com1 0
#define DATA_READY 0x100
#define TRUE 1
#define FALSE 0
#define SETTINGS (_COM_1200 | _COM_CHR7 | _COM_STOP1 | COM_NOPARITY)
...// main
unsigned in, out, status;
_bios_serialcom(_COM_INIT, COM1, SETTINGS);
for(;;)
{
status = _bios_serialcom(_COM_STATUS, COM1, 0);
if(status & DATA_READY)
if((out = _bios_serialcom(_COM_RECIEVE, COM1, 0) & 0x7F) != 0)
putch(out);
in = getch();
_bios_serialcom(_COM_SEND, COM1, in);
}
../ end main
I'd expect that in could also be used to send one byte at a time from a string using something like
Code:
char string[] = "test string";
int i;
for(;;) // from Borland's code
{
for(i = 0; string[i] != '\0'; i++)
_bios_serialcom(_COM_SEND, COM1, string[i]);
I haven't tried that myself, but I'd be interested in knowing if any part of it works. Good luck.