_bitfx_20.asm
bitfixer_bitfixer/dg/z88dk/libsrc/_DEVELOPMENT/sound/bit/z80/asm_bit_fx/_bitfx_20.asm

SECTION code_clib
SECTION code_sound_bit

PUBLIC _bitfx_20

INCLUDE "clib_target_cfg.asm"

_bitfx_20:

   ; descending buzzer

   ld hl,1000

desc1:

   push hl
   ld b,16

desc2:

   rl l
   rl h
   
   jr nc, desc3
   
   xor __sound_bit_toggle
   INCLUDE "sound/bit/z80/output_bit_device_2.inc"

desc3:

   ld e,5

desc4:

   dec e
   jr nz, desc4
   
   djnz desc2
   
   pop hl
   dec hl
   
   ld c,a
   
   ld a,h
   or l
   
   ld a,c
   jr nz, desc1
   
   ret
