home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / MM1 / SOUNDUTILS / beep.lzh / beep.a < prev    next >
Text File  |  1994-06-08  |  1KB  |  37 lines

  1. ******************************************************************************
  2. * Beep
  3. * By: Ricky Beam (cramer@catt.ncsu.edu)
  4. *
  5. * - Nifty little program to beep the speaker in a MM/1
  6. * -   this works WITHOUT a snddrv or any of that crap (heck you don't even
  7. * -   need windio!)
  8. *
  9. * - This program is a system state process for a reason, change it for
  10. * -   interesting results :-)
  11. *
  12. * Just another hack from Hacker Central
  13. ******************************************************************************
  14.  
  15.  use /dd/defs/asm/oskdefs.d
  16.  
  17. * psect beep_a,(Prgrm<<8)!Objct,(ReEnt<<8)!1,1,0,_beep,0
  18.  psect beep_a,(Prgrm<<8)!Objct,(ReEnt+SupStat<<8)!1,1,0,_beep,0
  19. *-------------------------------------^^^^^^^ :-)
  20.  
  21. _beep:
  22.     move.b #$00,d0
  23.  
  24. ramp    move.l #$00001fff,d1  * Adjust to increase the play time of each freq.
  25. loop    move.b #4,$9ffc1b     * Control port #4 == sound on
  26.     move.b d0,$9ffc21         * Loop control (freq)
  27.     Dbf d1,loop
  28.     subq.b #1,d0
  29.     bne.s ramp                * Continue for each frequency
  30.  
  31.     move.b #0,$9ffc1b         * Control port #0 == sound off
  32.     moveq.l #0,d0
  33.     os9 F$Exit
  34.  
  35.  ends
  36.  
  37.