program verwarming; uses wincrt;
var
   temp: integer;
function temperatuur: integer;
   const
      LPT1S=$3bd;
   var
      hulp: integer;
   begin
      hulp:=port[LPT1S];
      hulp:=hulp and $78;
      hulp:=hulp shr 3;
      temperatuur:=hulp+10
   end;
procedure verwarmingAan;
   const
      LPT1D=$3bc;
   begin
      port[LPT1D]:=port[LPT1D] or $08
   end;
procedure verwarmingUit;
   const
      LPT1D=$3bc;
   begin
      port[LPT1D]:=port[LPT1D] and $f7
   end;
begin
   temp:=temperatuur;
   if temp<=18
   then
      verwarmingAan
   else
      if temp>=20
      then
         verwarmingUit;
   writeln('De temperatuur is ', temp, ' graden C')
end.