Archived

This topic is now archived and is closed to further replies.

co-co

undefined structure REGS ??

Recommended Posts

I keep getting a compile error saying undefined structure ''REGS'' the code is: union REGS inregs, outregs; I searched and found many examples of this peice of code, i dont know what it does but i need it for a tutorial. Anyone know what I would have to do for the compiler to recognize REGS?

Share this post


Link to post
Share on other sites
Hi co-co,
REGS is a structure defined in the dos.h header files of DOS C/C++ compilers. This structure was used while making direct calls to bios functions under DOS.
Windows however, is a whole new ball game. It does not allow you to make direct calls to the bios. Hence the REGS structure is not defined in the dos.h file included with Windows C/C++ compilers like Visual C++.
If you want to compile this code, use a DOS C/C++ compiler (like Turbo C++ 3) and be sure to include the dos.h file.
Making direct BIOS calls under Windows is very messy. Think Dll thunking and/or VXDs. However, you can perform nearly all the required functions using the Win32 API anyway, so you practically never need to make Bios calls.

Hope this helped.
Tanuj

Share this post


Link to post
Share on other sites