Here's one that sounds like a blast from a futuristic laser:
Code:blast: ' soundcalc = $FD : sndcnt = 0 'make blast sound @ movlw 0x8F 'set the start frequency @ movwf _sbuff ' xxxxx: @ incf _sndcnt ,F ' IF sndcnt = $25 THEN return ' @ movf _soundcalc ,W 'calc the next sound @ addwf _sbuff ,F ' @ call _audo 'make sound @ decf _sbuff ,F ' @ incfsz _sbuff ,F ' @ goto _xxxxx 'check for exit blast routine @ return 'exit when sound is finished audo: SOUND portc.7,[sbuff,sbyte] 'output sound @ return '






Bookmarks