-
Compile problem
error C4226: nonstandard extension used : 'far' is an obsolete keyword
d:\program files\microsoft visual studio\myprojects\testarea\main.cpp(31) : error C2079: 'r' uses undefined union 'REGS'
When ever i try to use union REGS in my code it flags an error. is there a certain file i have to include or bad code??
void VGAScreen ()
{
union REGS r;
r.h.ah = 0;
r.h.al = 0x13;
int86(0x10, &r, &r);
}
//This resets the display to text mode
void TextScreen ()
{
union REGS r;
r.h.ah = 0;
r.h.al = 0x3;
int86(0x10, &r, &r);
}
Thanks.
-
vc++ is NOT a DOS compiler - it is a windows and console (win32) compiler.
> error C4226: nonstandard extension used : 'far' is an obsolete keyword
There are no near and far pointers in 32 bit systems - all pointers are 32 bits.
> d:\program files\microsoft visual studio\myprojects\testarea\main.cpp(31) : error C2079: 'r' uses undefined union 'REGS'
Since you can't call int86 from either windows or console mode programs, this is undeclared.
> is there a certain file i have to include or bad code??
Not necessarily bad, just inappropriate for your compiler and operating system.
You need a real DOS compiler, running real DOS to make this work as you intend.
-
where can i get such a "real" compiler?
thanks.
-
i think they have one at borland.com don't they? TCv2.0 right? that, and you can always use DJGPP... www.delorie.com/djgpp :)
-
-
oh my......... thank you salem...