Exemplo de Interface Mínima usando a unidade CRT

       

      uses USE,crt;
      { exemplo de uso da classe TMotorCmd }
      { turbo pascal source }
      { free pascal source for DOS & LINUX }
      
      var M:TMotorCmd;
      
      
      procedure Concl(var R:TRegra);
      var C:byte;
      begin
      C:=TextAttr;
      TextColor(LightBlue);
      Writeln(M.GetRegraStr(R));
      TextAttr:=C;
      end;
      
      var CMD:string;
      begin
      Writeln('----------------');
      Writeln('----------------');
      M.Init(Concl);
      
      while CMD<>'exit' do
            begin
            write('darkmind# ');
            CMD:='';
            readln(CMD);
            if (Length(CMD)>0) and M.ExecCmd(CMD)
               then writeln('ok');
            end;
      
      M.Done;
      
      end.