Prev: 59136 Up: Map Next: 59313
59281: Clear Slot Table
Used by the routine at Set_Phase_One.
Writes 0 to the occupied flag of each slot at Slot_Table. *Slot_Count is 19 if *New_Slot_Count is 1 else 38.
Clear_Slot_Table 59281 LD A,(61343) Fetch *New_Slot_Count.
59284 DEC A Decrease *New_Slot_Count by one.
59285 LD A,19 Set the slot count to 19.
59287 JR Z,Clear_Slot_Table_0 Jump to Clear_Slot_Table_0 if *New_Slot_Count was 1.
59289 ADD A,A Double the slot count.
Clear_Slot_Table_0 59290 LD (61341),A Write the slot count to *Slot_Count.
59293 LD B,A Copy the slot count to B.
59294 LD IX,23296 Point IX at Slot_Table.
59298 LD DE,6 Set the slot stride to 6 in DE.
59301 XOR A Clear A.
Clear_Slot_Table_1 59302 LD (IX+0),A Clear the occupied flag, and loop for each slot.
59305 ADD IX,DE
59307 DJNZ Clear_Slot_Table_1
59309 LD (61344),A Write 0 to *Write_Index.
59312 RET Return.
Prev: 59136 Up: Map Next: 59313