Bhai ap ne mujhe ye program sahi kar k diya tha phir mene dat file banai usse BIN k folder men rakh diaya lakin jab output per file name mangta hai men deta hon file name to black & white colour anae k bajaye sirf black screen ati hai no any benefit output..



#include <graphics.h>
#include <stdio.h>
#include <dos.h>
#include <stdlib.h>
#include <conio.h>

union REGS inregs, outregs ;
/* int argn, char **argv */
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15*/
int col[]={0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64} ;
int pats[]={1,2,4,8,16,32,40};
FILE *fpin;
void read_n_disp(void),
open_file(char *filename),
get_filename (char *s);
void grey_level(void);
void putdot (int , int , int);
void main (void)
{
int i, j, graphmode, graphdriver, EGAVGA_driver;
float l,k;
char c, filename[10], ch;
get_filename (filename);
open_file(filename),
grey_level();
read_n_disp();
//closegraph ();
textbackground (BLACK) ;
textcolor (BLINK) ;
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\Hit Enter Key for edit mode:");
getch();
/******* end of main *******/ }
/***
read_n_disp()
Reads the data file one character at a time. ****/
void read_n_disp (void)
{
int col, i, c, c1, c2, c3, x, y, s;
x=50; y=1; s=1;
while ((c=fgetc(fpin))!=EOF)
{
check_code:
c1=fgetc(fpin); c2=fgetc(fpin); c3=fgetc(fpin);
/*if((c1==48 && c2==63 && c3==48)|| (c1==63 && c2==48 && c3==63)) {*/
/*if((c1==64 && c2==79 && c3==64)|| (c1==79 && c2==46 && c3==79)) {*/
if((c1==65 && c2==79 && c3==65)|| (c1==79 && c2==65 && c3==79)) {
/* for ((i=0; i<26; i++) {c=fgetc(fpin);}*/
}
else {
goto check_code;
}
for (i=0; i<1024; i++) { c=fgetc(fpin);}
while ((c=fgetc(fpin))!=EOF)
{
c= c & 0x3f ;
c= 63 - c ;
pxon: if (s==1) {s++;} else {c=c-0; s=1;}
putdot (x,y,c) ;
if (x<=(50+208)) {x++;} else { for (i=0;
i<1024; i++)
{ c=fgetc(fpin);}
x=50; y++;}
}
}
/* printf("%d"' y-1);*/
fclose(fpin);
}
/****** open_file()
Attempts to open a data file for reading. *********/
void open_file(char *filename)
{
if((fpin = fopen(filename, "r")) == NULL){
printf("\nCannot open %s. Abort\n", filename);
exit(EXIT_FAILURE);
}
}
/***** get_filename()
* Gets the name of the data file to be read. *******/
void get_filename(char *s)
{
printf("\n\n\n\n\n\n\n\n\n\n\n\n\nEnter file name:");
gets(s);
}
/* ************************************************** ********** */
/* 64 Grey Shades Display Program */
void grey_level ()
{
/* union REGS inregs, outregs;*/
int i, j;
/* switch video mode to 320x200 256 colors */
inregs.h.al = 19;
inregs.h.ah = 0;
int86 (16, &inregs, &outregs) ;
/* generate 256 colors out of 262,144 possible combinations colors */
for ( i = 0; i < 64; i++)
{ /* R G B */
inregs.x.ax = 0x1010 ;
inregs.x.bx = i ;
inregs.h.cl=i;
inregs.h.ch=i ;
inregs.h.dh=i ;
int86 (16, &inregs, &outregs) ;
}
}
/*make_blk()
{
int i, k, j, m, n;
k=0;
for (i = 0; i < 128; i++)
{
for (k = 0; k < 128; k++)
{
putdot (i, k+50, (i&63)) ;
}
}
printf("\nhit Enter Key to go back to edit mode: ");
getche();
}
*/
void putdot (int x, int y, int c)
{
inregs.h.al = c; /* color number */
inregs.x.cx = x; /* x-coordinate */
inregs.x.dx = y; /* y-coordinate */
int86 (16, &inregs, &outregs) ;
}


also dat file attach and txt help me