Prev: E700 Up: Map Next: E7B1
E791: Clear Slot Table
Used by the routine at Set_Phase_One.
Writes 00 to the occupied flag of each slot at Slot_Table. *Slot_Count is 13 if *New_Slot_Count is 01 else 26.
Clear_Slot_Table E791 LD A,($EF9F) Fetch *New_Slot_Count.
E794 DEC A Decrease *New_Slot_Count by one.
E795 LD A,$13 Set the slot count to 13.
E797 JR Z,Clear_Slot_Table_0 Jump to Clear_Slot_Table_0 if *New_Slot_Count was 01.
E799 ADD A,A Double the slot count.
Clear_Slot_Table_0 E79A LD ($EF9D),A Write the slot count to *Slot_Count.
E79D LD B,A Copy the slot count to B.
E79E LD IX,$5B00 Point IX at Slot_Table.
E7A2 LD DE,$0006 Set the slot stride to 06 in DE.
E7A5 XOR A Clear A.
Clear_Slot_Table_1 E7A6 LD (IX+$00),A Clear the occupied flag, and loop for each slot.
E7A9 ADD IX,DE
E7AB DJNZ Clear_Slot_Table_1
E7AD LD ($EFA0),A Write 00 to *Write_Index.
E7B0 RET Return.
Prev: E700 Up: Map Next: E7B1