home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug013.arc / SOUND.PRO < prev    next >
Text File  |  1979-12-31  |  2KB  |  45 lines

  1. procedure SOUND;
  2.  
  3. {    Procedure developed in Turbo Pascal for the
  4.               MicroBee by Bob Burt
  5.  
  6.      Use in conjunction with procedure PLAY.PRO
  7.       to produce selected notes from the normal
  8.         scale (simulation of PLAY command in
  9.                 MicroWorld BASIC
  10.  
  11.   Note -  It is not necessary to include the
  12.          comments, which represent the assembly
  13.           language instructions from which the
  14.                inline code was derived
  15.           The inline code may be compacted, as
  16.             has been done for the procedure
  17.                LORES.PRO, for example            }
  18.  
  19. begin
  20.   inline (245/213/229/     { START:  PUSH AF,DE,HL    }
  21.           237/91/*+34/     {         LD   DE,(CYCLES) }
  22.           62/184/          {         LD   A,0B8H      }
  23.           211/2/           {         OUT  (2),A       }
  24.           205/*+18/        {         CALL PAUSE       }
  25.           62/248/          {         LD   A,0F8H      }
  26.           211/2/           {         OUT  (2),A       }
  27.           205/*+11/        {         CALL PAUSE       }
  28.           27/              {         DEC  DE          }
  29.           122/             {         LD   A,D         }
  30.           179/             {         OR   E           }
  31.           32/237/          {         JR   NZ,LOOP1    }
  32.           225/209/241/     {         POP  HL,DE,AF    }
  33.           201/             {         RET              }
  34.  
  35.           42/*+10/         { PAUSE:  LD   HL,(DELAY)  }
  36.           43/              { LOOP2:  DEC  HL          }
  37.           124/             {         LD   A,H         }
  38.           181/             {         OR   L           }
  39.           32/251/          {         JR   NZ,LOOP2    }
  40.           201/             {         RET              }
  41.  
  42.           159/1/           { CYCLES: DS   2           }
  43.           18/0);           { DELAY:  DS   2           }
  44. end; {procedure sound}
  45.