Thread: need help with int86()

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    2

    Unhappy need help with int86()

    hi,
    I am using int86() for serial communication. after including dos.h and bios.h, still the compiler(Dev-c++, Lcc,digital mars) dosent recognize int86 as a function.please let me know waht to do

    Thanx

    Ram

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    As far as I know int86() is not ANSI C, so your compilers don't need to support it. And they do.

    What you could do is
    - write your own version of int86, or
    - use inline assembly, or
    - use a different library
    - create a workaround

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > after including dos.h and bios.h,
    But as none of those compilers are capable of generating real DOS programs, this is a moot point.

    You could start by saying which OS you're actually programming for, then maybe we could direct you to the correct routines for serial comms in that OS.

  4. #4
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    Hmm...considering he said "Dos.h" and mentioned Dev-C++ (which, I may be wrong, is windows only - or at the least, I think LCC is.) it's probably safe to assume windows...

    inline ASM is the way to go, man.

    Code:
    _asm{ //could also use asm or __asm depending on compiler
        MOV here, there
        XOR this, that
        ADD here, that
        INT 10h
    }
    And for serial communications, I believe, look up ASM's IN and OUT commands.

  5. #5
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    >inline ASM is the way to go, man.

    which will only work on a compiler that generates DOS programs. If you want to do it as a win32 exe look up CreateFile(), in windows.h.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. int86()
    By Queatrix in forum C++ Programming
    Replies: 7
    Last Post: 10-04-2006, 12:08 PM
  2. Header file for int86() function
    By Mavix in forum C Programming
    Replies: 4
    Last Post: 10-02-2006, 01:12 AM
  3. inline assembler as alternative to int86()
    By Bigbio2002 in forum C Programming
    Replies: 3
    Last Post: 11-12-2004, 04:57 PM
  4. int86() - undefined reference
    By Kagey in forum C Programming
    Replies: 7
    Last Post: 11-11-2002, 01:22 AM
  5. Problem with int86() function
    By a_learner in forum C Programming
    Replies: 2
    Last Post: 10-11-2001, 05:52 AM