home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / c / cmsunit.zip / CMSALARM.PAS < prev    next >
Pascal/Delphi Source File  |  1992-07-17  |  579b  |  35 lines

  1. Program CMSTest; { a simple program to test the CMS unit }
  2.  
  3. Uses CRT,CMS;
  4.  
  5. Const
  6.      base = $220;
  7.  
  8. Var
  9.    vol,tone: integer;
  10.    finc,vinc : integer;
  11.  
  12. Begin
  13.   InitCMS;
  14.   vol := 0;
  15.   tone := 1;
  16.   vinc := 1;
  17.   finc := 2;
  18.   Repeat
  19.     CMSSound (1,vol,15-vol,tone*10,4);
  20.     If vol = 15 Then
  21.       vinc := -1;
  22.     If vol = 0 Then
  23.       vinc := 1;
  24.     If tone = 15 Then
  25.       finc := -1;
  26.     If tone = 0 Then
  27.       finc := 1;
  28.     Inc(vol,vinc);
  29.     Inc(tone,finc);
  30.     delay (15);
  31.   Until keypressed;
  32.   CMSEnableVoice (0);
  33.   CMSEnableNoise (0);
  34. End.
  35.