-
complier with bios.h
Hello
I am trying to compile this program using mingw complier but I dont think it has the bios.h library file. Can anybody recommend a freeware complier with the bios.h library (if any)
thanks in advance
Code:
#include <stdio.h>
#include <bios.h>
int main()
{
unsigned com1_status;
unsigned com1_send;
unsigned com1_rec;
unsigned com1_init;
/* setup for Com1, 8bits of data, no parity, one stop bit, 300 baud */
com1_init = _bios_serialcom(_COM_INIT, 0,_COM_CHR8 | _COM_NOPARITY | _COM_STOP1 | _COM_300);
printf("Init status: 0x%4.4X\n", com1_init);
com1_send = _bios_serialcom(_COM_SEND, 0, '*');
printf("Send status: 0x%4.4X\n", com1_send);
return 0;
}
-
-
thanks for your help
sorry iam pretty lame at this iam getting an error from dev-c++ every time i run the compiler its saying:-
COM_INIT' undeclared (first use in this function)
is there anything wrong with my program?
thanks
-
I believe 'Bios.h' is MS-DOS specific. I don't think you are going to find it on newer compilers.
-
wow, can I access bios info with bios.h ? cool I'll check it out
-
thanks again so the program will not work with the dev c++. Are there any old freeware compliers that will work with the bios.h? I heard that turbo c++ 3 will work with bios.h but i cant download it anywhere.
Thanks in advance
-
Just forget about bios.h - Everything you need to do serial port programming using dev c++ is in this thread.
gg