  Procedure Beep; Begin Write (#7) End;

  Procedure IOErr (Message: AnyString);
  Begin ErrFlag := true; Beep; Writeln (Message); Writeln End;

  Procedure OpenFiles;
    Var	PPos: byte;
	RelName,InlName:FName;
  Begin
    BytePtr :=128; BitCnt := 0;
    Finis := false; ErrFlag := false; EoFile := false;
    Writeln; Write ('REL-File: '); Read (RelName);
    If RelName='' then Finis := true
    else Begin
      PPos := Pos (RelName,'.');
      if PPos=0 then
        Begin PPos := Length(RelName) +1; RelName := RelName + '.REL' End;
{$I-} Assign (RelFile,RelName); Reset (RelFile);
{$I+} if IOResult>0 then IOErr ('	No REL-FILE!')
      else Begin
        Write (' - Inlinefile: '); Readln (InlName); Writeln;
        if InlName='' then InlName := Copy (RelName,1,PPos) + 'INL'
          else if Pos(InlName,'.')=0 then InlName := InlName + '.INL';
{$I-} Assign (InlFile,InlNAme); Rewrite (InlFile);
{$I+} if IOResult>0 then IOErr ('Error with Inline-File!')
    End
  End
End;

  type HexString = String[4];
function Hex (Number: integer): HexString;
  Var N,Intm: integer; IntStr: HexString;
Begin
  IntStr := '0000';
  for N := 4 downto 1 do
  Begin
    Intm := (Number and $0F) + $30;
    if Intm > $39 then Intm := Intm + 7;
    IntStr[N] := Chr(Intm); Number := Number shr 4
  End;
  Hex := Intstr
End;

function Max (A,B:integer): integer;
Begin if A>=B then Max := A else MAx := B End;

