Looking for int86() in dos.h

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
I'm a student, trying to write a little c++ app to talk to the serial port. It's clear that the function int86() lives in dos.h, but all I see in there when I open dos.h in an editor is what looks like a function prototype

int _Cdecl int86( int __intno,
union REGS *__inregs,
union REGS *__outregs );

That's everything in the whole file regarding int86(). I was hoping to see some code that might show what int86 does. This is just curiosity. I know how to use int86 to set and get data from the registers, I just wish I knew what it actually does to accomplish it. I'm just a student, so I only know that header files contain the functions you might need in your program, so you have to #include what you need, but when I've looked inside they are pretty much beyond me to understand at this point. Some stuff I can follow, but I'm puzzled on this one.

Anyone want to give me some coaching?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
header files usually only contain declarations of functions, the real code would be in the C code, I mean the .c file and you'll have a pretty hard time getting that from MS. This is why Linux rocks =)

I don't know anything about that particular function though, so I can't help you more.
 

Felecha

Golden Member
Sep 24, 2000
1,434
0
0
In Visual C++ int86 actually isn't in dos.h. In our class, we've been using TurboC++, and their version of dos.h has the int86, but again only declared, not defined. So there's a deeper repository than the header files?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So there's a deeper repository than the header files?

Yes, the .c files containing the real source to everything declared in the header files. I believe it's done this way so you don't need the whole source to compile an app against a library, you just need the headers. But this also means companies like MS can keep their source code secret and make it hard for people to learn about their methods.