Skip to main content
GameDev.net gamedev.net
🔒 Locked

undefined structure REGS ??

Started by co-co Dec 24, 2002 at 9:48 AM 0 replies 2.4k views
Original Post
co-co
co-co
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?
Tanuj
Tanuj
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.