Thread: complier with bios.h

  1. #1
    Registered User
    Join Date
    Mar 2005

    Question complier with bios.h


    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

    #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;

  2. #2
    People Love Me
    Join Date
    Jan 2003

  3. #3
    Registered User
    Join Date
    Mar 2005
    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?


  4. #4
    Registered User
    Join Date
    Sep 2004
    I believe 'Bios.h' is MS-DOS specific. I don't think you are going to find it on newer compilers.

  5. #5
    Registered User
    Join Date
    Mar 2004
    wow, can I access bios info with bios.h ? cool I'll check it out
    This forum is the best one I've ever seen. Great ppl, great coders

  6. #6
    Registered User
    Join Date
    Mar 2005
    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

  7. #7
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Just forget about bios.h - Everything you need to do serial port programming using dev c++ is in this thread.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. bios.h
    By yanol in forum C++ Programming
    Replies: 3
    Last Post: 06-27-2008, 03:24 PM
  2. C # complier
    By obaid in forum C# Programming
    Replies: 2
    Last Post: 02-17-2008, 03:23 PM
  3. Which complier?
    By sreenadh in forum C++ Programming
    Replies: 6
    Last Post: 03-18-2006, 02:56 AM
  4. in need of bios.h and bios.lib
    By volpe12 in forum C++ Programming
    Replies: 3
    Last Post: 06-24-2005, 08:30 AM
  5. complier design
    By condorx in forum C Programming
    Replies: 1
    Last Post: 04-06-2002, 09:47 AM