hello ,
i have a question that i m using a bioscom function but it is not work properly , sample code of bioscom is also not work properly, my comp specification is windows7 -32 bit, & compiler specification is turbo c dos box -16 bit.
--here is the code ,and the problem is this that this code can't b able to access the com port of my pc.
Code:
#include
#include
#define COM3 2
#define DATA_READY 0x100
#define [COLOR=#009900 !important]SETTINGS[/COLOR] ( 0x80 | 0x02 | 0x00 | 0x00)
int main(void)
{
int in, out, status;
bioscom(0, SETTINGS, COM1); /*initialize the port*/
printf("Data sent to you: ");
while (1)
{
status = bioscom(3, 0, COM1); /*wait until get a data*/
if (status & DATA_READY)
if ((out = bioscom(2, 0, COM1) & 0x7F) != 0) /*input a data*/
putch(out);
if (kbhit())
{
if ((in = getch()) == 27) /* ASCII of Esc*/
break;
bioscom(1, in, COM1); /*[COLOR=#009900 !important]output[/COLOR] a data*/
}
}
return 0;
}
thanks in advance