
 1000  *---------------------------------
 1010  *      LASER "SWOOP" SOUND
 1020  *---------------------------------
 1030  SPEAKER    .EQ $C030
 1040  PULSE.COUNT .EQ $00
 1050  PULSE.WIDTH .EQ $01
 1060  SWOOP.COUNT .EQ $02
 1070  *---------------------------------
 1080  SWOOP  LDA #1       ONE PULSE AT EACH WIDTH
 1090         STA PULSE.COUNT
 1100         LDA #160     START WITH MAXIMUM WIDTH
 1110  *  (ALSO TRY VALUES OF 40, 80, 128, AND 160.)
 1120         STA PULSE.WIDTH
 1130  .1     LDY PULSE.COUNT
 1140  .2     LDA SPEAKER  TOGGLE SPEAKER
 1150         LDX PULSE.WIDTH
 1160  .3     DEX          DELAY LOOP FOR ONE PULSE
 1170         BNE .3
 1180         DEY          LOOP FOR NUMBER OF PULSES
 1190         BNE .2       AT EACH PULSE WIDTH
 1200         DEC PULSE.WIDTH  SHRINK PULSE WIDTH
 1210         BNE .1       TO LIMIT OF ZERO
 1220         RTS
 1230  *---------------------------------
 1240  *      MULTI-SWOOPER
 1250  *---------------------------------
 1260  SWOOP2 LDA #10      NUMBER OF SWOOPS
 1270         STA SWOOP.COUNT
 1280  .1     JSR SWOOP
 1290         DEC SWOOP.COUNT
 1300         BNE .1
 1310         RTS

