#include #include #include #include #include #define VGA256 0x13 #define TEXT_MODE 0x03 unsigned char far * video_buffer; unsigned long int n = 2*pow10l(5); unsigned long i,j; float k; unsigned char c; unsigned char huge buffer[480000]; void Print_Scr(void){ FILE *in_fp, *out_fp; in_fp = fopen("template.pcx", "rb"); out_fp = fopen("temp.pcx","wb"); for(i=0;i<128;i++){ fread(&c, sizeof(char), 1, in_fp); fwrite(&c, sizeof(char), 1, out_fp); } for(i=0;i<480000;i++){ c = buffer[i]; if(c<192){ fwrite(&c, sizeof(char), 1, out_fp);} else{ c=193; fwrite(&c, sizeof(char), 1, out_fp); c = buffer[i]; fwrite(&c, sizeof(char), 1, out_fp); } } fclose(in_fp); fclose(out_fp); printf("PrintScr successful"); } //End function Print_Scr void Set_Video_Mode(int mode){ union REGS inregs,outregs; inregs.h.ah = 0; inregs.h.al = (unsigned char)mode; int86(0x10, &inregs, &outregs);} void main(void) { video_buffer = (unsigned char far *) 0xA0000000L; double sumr, sumi,logc; long x,y; double first, secondr, secondi; long int count; double real = .5; long double imag = 936391.0; //267653395648.848 float f =1.0; sumr=0; sumi=0; for(count=1;count-400&&y<300&&y>-300) buffer[x+800*y+240000+400]=255; if(kbhit()){ Print_Scr(); return; } } Print_Scr(); while(!kbhit()){} Set_Video_Mode(TEXT_MODE); }