program ezyview_102;
uses crt;
var
a:array [1..64700] of char;
r,c:word;
I:file;

function convord(b:char):byte;
begin
b:=upcase(b);
if b in ['0'..'9'] then convord:=ord(b)-48 else convord:=ord(b)-55;
end;

begin
Writeln('þ EzyView 1.02 (c) Patrick Cervicek 1995');
if paramcount=0 then
begin
 writeln('þ EZYVIEW.EXE <EzyCom TextFile to display>');
 halt;
end;

clrscr;
assign(i,paramstr(1));
reset(i,1);
blockread(i,a,filesize(i),r);
close(i);
for c:= 1 to r do
begin
if (a[c]=#11) and (upcase(a[c+1])='B') then
   begin
    textbackground(convord(a[c+2]));
    c:=c+3;
    textcolor(convord(a[c]));
    end else
     case a[c] of
      #1:readln;
      #9:write('        ');
      #12:clrscr;
      #22:delay(3000);
      #1..#9,#22..#24:;
     else write(a[c]);
   end;
end;


end.

