complier with bios.h

This is a discussion on complier with bios.h within the C Programming forums, part of the General Programming Boards category; Hello I am trying to compile this program using mingw complier but I dont think it has the bios.h library ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    4

    Question 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;
    
    }

  2. #2
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

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

  4. #4
    Registered User
    Join Date
    Sep 2004
    Posts
    44
    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
    Posts
    161
    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
    Posts
    4
    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
    Posts
    4,646
    Just forget about bios.h - Everything you need to do serial port programming using dev c++ is in this thread.

    gg

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, 02:23 PM
  3. Which complier?
    By sreenadh in forum C++ Programming
    Replies: 6
    Last Post: 03-18-2006, 01: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, 08:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21