Prev: C051 Up: Map Next: C077
C064: Sounds: Find Empty Slot
Used by the routines at 965D and 974A.
Sounds_FindEmptySlot C064 LD IX,$C0B8 IX=Sounds_Queue.
There are 05 slots in total, obviously the first slot is accounted for on the first pass, so only 04 loops are necessary.
C068 LD B,$04 B=04 (counter).
C06A LD DE,$0007 Each slot is 0007 bytes.
Found an empty slot, so return.
Sounds_FindEmptySlot_Loop C06D LD A,(IX+$00) Return if *IX+00 is zero.
C070 AND A
C071 RET Z
C072 ADD IX,DE IX+=DE.
C074 DJNZ Sounds_FindEmptySlot_Loop Decrease counter by one and loop back to Sounds_FindEmptySlot_Loop until counter is zero.
C076 RET Return.
Prev: C051 Up: Map Next: C077