Prev: 59996 Up: Map Next: 60145
60000: Insert Object Slot
Used by the routine at Count_Remaining.
Inserts a slot into Object_Slots from the tables at Object_Pointers.
Insert_Object_Slot 60000 PUSH AF Stash AF on the stack.
60001 PUSH HL Stash the pointer on the stack.
60002 LD A,(61315) Fetch *Slot_Limit.
60005 LD HL,61314 Point HL at Occupied_Count.
60008 SUB (HL) SUB (HL).
60009 JR NZ,Insert_Object_Slot_0 Jump to Insert_Object_Slot_0 if non-zero.
60011 POP HL Restore HL from the stack.
60012 INC HL Advance the pointer by one.
60013 INC HL Advance the pointer by one.
60014 POP AF Restore AF from the stack.
60015 JP Insert_Object_Slot_6 Jump to Insert_Object_Slot_6.
Insert_Object_Slot_0 60018 LD A,(61314) Fetch *Occupied_Count.
60021 AND A Clear carry.
60022 JR Z,Insert_Object_Slot_1 Jump to Insert_Object_Slot_1 if zero.
60024 INC A Increment A by one.
60025 LD B,A LD B,A.
60026 ADD A,A ADD A,A.
60027 ADD A,A ADD A,A.
60028 ADD A,B ADD A,B.
60029 ADD A,A ADD A,A.
60030 ADD A,B ADD A,B.
60031 LD C,A LD C,A.
60032 DEC A Decrease A by one.
60033 LD H,235 Set H to 235.
60035 LD L,A LD L,A.
60036 LD DE,11 Set DE to 11.
60039 PUSH HL Stash the pointer on the stack.
60040 ADD HL,DE Add DE.
60041 EX DE,HL Swap DE with HL.
60042 POP HL Restore HL from the stack.
60043 LD B,0 Set the counter to 0 in B.
60045 LD A,C LD A,C.
60046 SUB 11 SUB $0B.
60048 LD C,A LD C,A.
60049 LDDR Copy the bytes backwards.
Insert_Object_Slot_1 60051 LD HL,61314 Point HL at Occupied_Count.
60054 INC (HL) INC (HL).
60055 POP HL Restore HL from the stack.
60056 POP AF Restore AF from the stack.
60057 LD IX,60171 Point IX at Second_Object_Slot.
60061 LD (IX+0),1 LD (IX+$00),$01.
60065 DEC A Decrease A by one.
60066 ADD A,A ADD A,A.
60067 EX DE,HL Swap DE with HL.
60068 LD HL,53208 Point HL at Object_Pointers.
60071 ADD A,L ADD A,L.
60072 LD L,A LD L,A.
60073 JR NC,Insert_Object_Slot_2 Jump to Insert_Object_Slot_2 if carry is reset.
60075 INC H INC H.
Insert_Object_Slot_2 60076 LD A,(HL) LD A,(HL).
60077 LD (IX+9),A LD (IX+$09),A.
60080 INC HL Advance the pointer by one.
60081 LD A,(HL) LD A,(HL).
60082 LD (IX+10),A LD (IX+$0A),A.
60085 EX DE,HL Swap DE with HL.
60086 INC HL Advance the pointer by one.
60087 PUSH HL Stash the pointer on the stack.
60088 LD A,(HL) LD A,(HL).
60089 PUSH AF Stash AF on the stack.
60090 RRA RRA.
60091 RRA RRA.
60092 RRA RRA.
60093 RRA RRA.
60094 AND %00001111 AND $0F.
60096 CALL Process_Draw_List_30 Call Process_Draw_List_30.
60099 LD HL,53220 Point HL at Object_Letters.
60102 ADD A,L ADD A,L.
60103 LD L,A LD L,A.
60104 JR NC,Insert_Object_Slot_3 Jump to Insert_Object_Slot_3 if carry is reset.
60106 INC H INC H.
Insert_Object_Slot_3 60107 LD A,(HL) LD A,(HL).
This entry point is used by the routine at Process_Draw_List.
Insert_Object_Slot_4 60108 LD (IX+7),A LD (IX+$07),A.
60111 POP AF Restore AF from the stack.
60112 AND %00001111 AND $0F.
60114 ADD A,A ADD A,A.
60115 ADD A,A ADD A,A.
60116 LD HL,53228 Point HL at Object_Vertices.
60119 ADD A,L ADD A,L.
60120 LD L,A LD L,A.
60121 JR NC,Insert_Object_Slot_5 Jump to Insert_Object_Slot_5 if carry is reset.
60123 INC H INC H.
Insert_Object_Slot_5 60124 LD DE,60172 Set DE to 60172.
60127 LD BC,4 Set BC to 4.
60130 LDIR Copy the bytes.
60132 LD (IX+5),0 LD (IX+$05),$00.
60136 LD (IX+6),10 LD (IX+$06),$0A.
60140 POP HL Restore HL from the stack.
60141 INC HL Advance the pointer by one.
Insert_Object_Slot_6 60142 JP Process_Draw_List_29 Jump to Process_Draw_List_29.
Prev: 59996 Up: Map Next: 60145