I have the following simple code which retreives the amount of memory from a system:
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.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; }
Any ideas?
Thanks.