I have a question I get this error can't include dos.h header.
I am compiling on a 64 bit computer with a amd processor using window 7 trying to make a 64 bit.exe.
here's the code, actually I got this from a book and can't get it to run.
Code:#include <stdio.h> #include <stdlib.h> #include <time.h> #include <dos.h> #define FACE 0x01 #define LOOP 100 #define PAUSE 150000 #define VIDEO 0x10 #define COLS 80 #define ROWS 25 void cls(void); void locate(int col, int row); int rnd(int range); void seedrnd(void); void main(); { int t,x,y; unsigned long p; cls(); seedrnd(); for(t=0;t<LOOP;t++) { x=rnd(80)+1; y=rnd(25)+1; locate(x,y); putchar(FACE); } void cls(void) { union REGS regs; regs.h.ah=0x06; regs.h.al=0x00; regs.h.bh=0x07; regs.h.ch=0x00; regs.h.cl=0x00; regs.h.dh=ROWS 1; regs.h.dl=COLS 1; int86(VIDEO,®s,®s); locate(0,0); } void locate(int col, int row) { union REGS regs; regs.h.ah=0x02; regs.h.bh=0x00; regs.h.dh=row; regs.h.dl=col; int86(VIDEO, ®s,®s); } int rnd(int range) { int r; r=rand()%range; return(r); } void seedrnd(void) { srand((unsigned)time(NULL)); }



LinkBack URL
About LinkBacks



