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