Prev: 49233 Up: Map Next: 49271
49252: Sounds: Find Empty Slot
Used by the routines at 38493 and 38730.
Sounds_FindEmptySlot 49252 LD IX,49336 IX=Sounds_Queue.
There are 5 slots in total, obviously the first slot is accounted for on the first pass, so only 4 loops are necessary.
49256 LD B,4 B=4 (counter).
49258 LD DE,7 Each slot is 0007 bytes.
Found an empty slot, so return.
Sounds_FindEmptySlot_Loop 49261 LD A,(IX+0) Return if *IX+0 is zero.
49264 AND A
49265 RET Z
49266 ADD IX,DE IX+=DE.
49268 DJNZ Sounds_FindEmptySlot_Loop Decrease counter by one and loop back to Sounds_FindEmptySlot_Loop until counter is zero.
49270 RET Return.
Prev: 49233 Up: Map Next: 49271