home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / dosc / dosbel.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1985-09-17  |  2.3 KB  |  95 lines

  1. (*
  2.    Ever get tired of watching your computer screen for errors generated
  3.    by some command when running a large batch file? We did. This program
  4.    was the result of a need for a 'hailer' for batch error levels and
  5.    completion of job. (that way we could hang around the coffee machine more).
  6.    enjoy it..
  7.  
  8.         Public Domain software by
  9.                                   L/G Computer Consultants
  10.                                           box 190
  11.                                     Willingboro, NJ 08046
  12.  
  13.  
  14.     Note: compile to a .com file with a mAximum memory of 300.
  15.  
  16. *)
  17.  
  18. var
  19.  i :integer;
  20.  
  21.  
  22.  
  23. procedure warning;       (* sound procedures for IBM only.. for cpm *)
  24.   begin                  (* change to write(^G) statements (use the imagination *)
  25.     while not keypressed do
  26.        begin
  27.          sound(660);
  28.          delay(150);
  29.          sound(440);
  30.          delay(100);
  31.          nosound;
  32.          delay(800);
  33.        end;
  34.   end;
  35.  
  36.  
  37. procedure alarm;
  38.  
  39. var
  40.   x: integer;
  41.   begin
  42.     while not keypressed do
  43.       begin
  44.         for x:=440 to 2000 do
  45.           sound(x);
  46.         for x:= 2000 downto 440 do
  47.           sound(x);
  48.       end;
  49.     nosound;
  50.  end;
  51.  
  52.  
  53. procedure bell;
  54.  
  55.   begin
  56.    write(^G);
  57.   end;
  58.  
  59.  
  60. procedure help;
  61.  begin
  62.    writeln(' Public Domain software by:   L/G Computer Consultants');
  63.    writeln('                                      box 190 ');
  64.    writeln('                                Willingboro, NJ 08046');
  65.    writeln;
  66.    writeln('ERROR: invalid command line.');
  67.    writeln;
  68.    writeln(' W : warning- provides two-tone paced alarm until a key is pressed');
  69.    writeln(' A : siren alarm- continuous until keypressed');
  70.    writeln(' B : single bell');
  71.    writeln;
  72.    writeln(' Enter commandline selection with a space after the filename');
  73.    writeln(' example:  A>dosbel w');
  74.    writeln;
  75.  end;
  76.  
  77. begin { main }
  78. Textcolor(LightGray);
  79.  if paramcount >0 then  (* paramcount and paramstr() are pre-defined in turbo 3.0 *)
  80.     begin
  81.        case upcase(paramstr(1)) of
  82.          'A' : alarm;
  83.          'B' : bell;
  84.          'W' : warning;
  85.          else help;
  86.       end;
  87.     end
  88.   else
  89.    help;
  90. end.
  91.  
  92.  
  93.  
  94.  
  95.