case gr.Canvas.Pixels[y,x*8 + 6] of
            clRed:    i1 := i1 + 4;
            clGreen:  i1 := i1 + 4;
            clYellow: begin 
                        i1 := i1 + 4; 
                        i2 := i2 + 4; 
                      end;
          end;
          case gr.Canvas.Pixels[y,x*8 + 7] of
            clRed:    i1 := i1 + 2;
            clGreen:  i1 := i1 + 2;
            clYellow: begin 
                        i1 := i1 + 2; 
                        i2 := i2 + 2; 
                      end;
          end;
          case gr.Canvas.Pixels[y,x*8 + 1] of
            clRed:    i1 := i1 + 1;
            clGreen:  i1 := i1 + 1;
            clYellow: begin 
                        i1 := i1 + 1; 
                        i2 := i2 + 1; 
                      end;
          end;

          Result := Result + IntToHex(i1,2) + IntToHex(i2,2);
         end;
      end;
    end;
end;

function DPDisParse(s: string) : tDPDisText;
var
  i,i2 : integer;
begin
  Result.Zahlen := '';
  i2 := 0;
  if s[1]='.' then s := ' '+s;
  while pos('..',s)>0 do
    s := copy(s,1,pos('..',s))+' '+copy(s,pos('..',s)+1,length(s));
  for i := 1 to length(s) do begin
    if (s[i] = '.') then
      Result.Dots[i2] := true
    else
      if s[i] in ['0'..'9', ' '] then begin
        inc(i2);
        Result.Dots[i2] := false;
        Result.Zahlen := Result.Zahlen + s[i];
      end;
  end;
end;

function HellParse(i : integer) : tHell;
begin
  Result.rot := i;
  Result.gruen := i;
end;

function send(s : string; WaitforAnswer : boolean) : String;
begin
  lCom.WriteString(s + #$0d);
  if WaitForAnswer then begin
    result := lCom.ReadChar;
  end;
end;