Prev: 45476 Up: Map Next: 45545
45523: Scan Object Slots
OR together the types of the 24-byte object slots from Object_Slot_1 (four, or six from ScanObjectSlots_Test). Return with the zero flag set if all are free.
OR together the object-slot types starting at Object_Slot_1.
ScanObjectSlots 45523 LD HL,24840 HL=Object_Slot_1.
45526 LD B,4 Set a slot counter in B for 4 loops.
Merge the types of the slots, stepping over each slot in turn.
ScanObjectSlots_Loop 45528 LD DE,24 DE=0024.
45531 XOR A Clear A.
ScanObjectSlots_MergeType 45532 OR (HL) Merge in the current slot type.
45533 ADD HL,DE Move onto the next slot.
45534 DJNZ ScanObjectSlots_MergeType Decrease the slot counter by one and loop back to ScanObjectSlots_MergeType until every slot is tested.
45536 OR A Test the merged types.
45537 RET Return.
Scan six slots instead of four.
ScanObjectSlots_Test 45538 LD HL,24840 HL=Object_Slot_1.
45541 LD B,6 B=6.
45543 JR ScanObjectSlots_Loop Jump to ScanObjectSlots_Loop.
Prev: 45476 Up: Map Next: 45545