MODULE LookAtChrTable; (* This program can be used to look at the contents of a .CHR file which is created by the program CTABLE. *) IMPORT Terminal; FROM FileSystem IMPORT File,Done,Create,Open,Close, ReadChar, WriteChar, Name; FROM InOut IMPORT in, out, OpenInput, OpenOutput, CloseInput, CloseOutput, ReadLn, ReadCard, Write, WriteLn, WriteCard, WriteString; CONST Maxrow = 27; Maxcol = 21; VAR infile: ARRAY [1..80] OF CHAR; Ans : CHAR; PROCEDURE Print( infile : ARRAY OF CHAR (* in *)); VAR c : CHAR; i, j, k : CARDINAL; fin : File; BEGIN WriteString("Opening "); WriteString( infile ); WriteLn; Open( fin, infile, FALSE ); IF NOT Done( ) THEN WriteString("Could not open "); WriteString( infile ); WriteLn; HALT END; FOR j := 1 TO Maxrow DO FOR i := 1 TO Maxcol DO ReadChar( fin, c ); WriteCard( ORD( c ), 3); END; WriteLn; END; END Print; BEGIN Terminal.WriteString( "Infile (.chr ) >" ); Terminal.ReadString( infile ); Terminal.ReadLn; Print( infile ) END LookAtChrTable.