I am trying to compile the following code in Cygwin 64 bit terminal using gcc, but it seems to be unable to find conio.h or dos.h
#include <stdlib.h>
#include <dos.h>
#define MEM 0X12
main()
{
struct WORDREGS
{
unsigned int ax;
unsigned int bx;
unsigned int cx;
unsigned int dx;
unsigned int si;
unsigned int di;
unsigned int flags;
};
struct BYTEREGS
{
unsigned char al,ah;
unsigned char bl,bh;
unsigned char cl,ch;
unsigned char dl,dh;
};
union REGS
{
struct WORDREGS x;
struct BYTEREGS h;
};
union REGS regs;
unsigned int size;
int86(MEM, ®s, ®s);
size = regs.x.ax;
printf("Memory size is %d Kbytes", size);
}
The compiler says it is unable to locate dos.h or conio.h, showing a fatal error notice. I want to know what the reason for this is and how it can be dealt with.