From: "Florent" Newsgroups: comp.os.msdos.djgpp Subject: com1 programming .... a lot of question Date: Wed, 17 May 2000 17:26:09 +0200 Organization: Aachen University of Technology (RWTH) Lines: 43 Message-ID: <8fudhg$jnb$1@nets3.rz.RWTH-Aachen.DE> NNTP-Posting-Host: pupulse.oih.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 958577008 20203 137.226.149.42 (17 May 2000 15:23:28 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 17 May 2000 15:23:28 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I'm trying to send datas in the com1 to a controller in order to pilot a machine. I have some questions about the functions _bios_serialcom. I use : state= _bios_serialcom(_COM_STATUS,0,byte); then I want to test byte with all the values in order to get the settings of the COM1, I do : if ((byte&_COM_9600)==_COM_9600) printf ("9600 bauds); But I have problems because when I init the com1 at 9600bauds (with _COM_INIT) and then I test the status of the com1, the settings are not 9600 bauds, it's always 110bauds ! Do I test it in the wrong way or ..... ??? For _COM_INIT I do : state=_bios_serialcom(_COM_INIT,0,_COM_9600 | _COM_CHR8 | _COM_STOP1 | _COM_NOPARITY); There is something strange also, I test the constante _COM_STOP1, _COM_STOP2 and _COM_EVENPARITY and there are egal to 0 !!!! Hwo can I know if my settings is one stop bit or 2 if both constante egal to 0 !! In order to know the value of all constant of _bios_serialcom I have done : printf("%#x|%#x|%#x|%#x|%#x|%#x|%#x|%#x|%#x|%#x|%#x|%#x|%#x|%#x|%#x",_COM_CH R7,_COM_CHR8,_COM_STOP1,_COM_NOPARITY, _COM_ODDPARITY,_COM_EVENPARITY,_COM_110,_COM_150, _COM_300,_COM_600,_COM_1200,_COM_2400,_COM_4800,_COM_9600); thank you for your help ... Florent.