-
Rom Bios
I have the following simple code which retreives the amount of memory from a system:
Code:
#include <iostream.h>
#include <dos.h>
int main()
{
const MEM = 0x12;
// inregs and outregs variables used in int86() are of union type REGS
REGS regs;
int86(MEM, ®s, ®s);
cout << "\nMemory size:" << regs.x.ax;
}
I compile this program using Visual C++ without any error, but when I execute it I receive an error message saying it cannot execute the program.
Any ideas?
Thanks.
-
sorry.....in function int86()...
the ® is actually:
Code:
& r e g s // all together
-
You need an old dos compiler. Visual c is a windows compiler.