home *** CD-ROM | disk | FTP | other *** search
- var
- i :integer;
-
-
-
- procedure warning; (* sound procedures for IBM only.. for cpm *)
- begin (* change to write(^G) statements (use the imagination *)
- while not keypressed do
- begin
- sound(660);
- delay(150);
- sound(440);
- delay(100);
- nosound;
- delay(800);
- end;
- end;
-
-
- procedure alarm;
-
- var
- x: integer;
- begin
- while not keypressed do
- begin
- for x:=440 to 2000 do
- sound(x);
- for x:= 2000 downto 440 do
- sound(x);
- end;
- nosound;
- end;
-
-
- procedure bell;
-
- begin
- write(^G);
- end;
-
-
- procedure help;
- begin
- writeln(' W : warning- provides two-tone paced alarm until a key is pressed');
- writeln(' A : siren alarm- continuous until keypressed');
- writeln(' B : single bell');
- writeln;
- writeln(' Enter commandline selection with a space after the filename');
- writeln(' example: A>dosbel w');
- writeln;
- writeln('if dosbel is entered with no commandline, this help message appears');
- end;
-
- begin { main }
- Textcolor(LightGray);
- if paramcount >0 then (* paramcount and paramstr() are pre-defined in turbo 3.0 *)
- begin
- case upcase(paramstr(1)) of
- 'A' : alarm;
- 'B' : bell;
- 'W' : warning;
- end;
- end
- else
- help;
- end.