-
_bios_serialcom HELP!!!
Using _bios_serialcom how would i send a command (eg. "LTD\r") in one go?
I've tried putc, putch but so far can only achieve it in the most repeatetive way
_bios_serialcom(_COM_SEND, COM2, 'L');
_bios_serialcom(_COM_SEND, COM2, 'T');
_bios_serialcom(_COM_SEND, COM2, 'D');
_bios_serialcom(_COM_SEND, COM2, '\r');
which is obviously a waste of time & code.
TIA!!!!
-
BTW, i'm using Borland Turbo C++ 3.0 DOS
-
Disagreeably Disagreeable
Write a function that sends a string. Hint: Use a loop. Another hint: You _may_ have to pause a short amount of time between each write, depending on how fast your computer is and how fast your serial port can send.
-
i just found that the following works perfectly.
for(i=0; cmd[i]; i++)
_bios_serialcom(_COM_SEND, COM2, cmd[i]);
Popular pages
Recent additions