home *** CD-ROM | disk | FTP | other *** search
- program dispany; { display any ADRG file generated with }
- { the adrgrgb or adrgtpc programs }
- uses Crt,Graph;
-
- const r = 349; {349 maximum for EGA}
- c = 639; {639 maximum for EGA}
- var
- fael : file;
- user_file : string;
- ro,col, grdrv,grmod : integer;
- ch : char;
- buf : array[0..639] of byte; {change the limit if the value of c is changed}
- wrtcnt : word;
- temp : byte;
-
- begin {** dispany **}
- checkbreak := true;
- grdrv := EGA;grmod := EGAHi; {change accordingly if other than EGA}
-
- { Prompt user for input file name }
- writeln;writeln;
- write(' Enter name of file to be displayed: ');
- readln(user_file);
-
- assign(fael,user_file);reset(fael,1);
- InitGraph(grdrv,grmod,'');
-
- for ro := 0 to r do
- begin
- blockread(fael,buf,sizeof(buf),wrtcnt);
- for col := 0 to c do
- putpixel(col, ro , buf[col]);
- end; {** for ro **}
-
- close(fael);
-
- ch := ReadKey;
- CloseGraph;
- end. {** dispany **}