Prev: DF08 Up: Map Next: E062
E03D: Compare Slot With Site
Used by the routine at MakeTiles.
Compares a slot for a pick-up with a site, using the column, the row and the position. The result is that the zero flag is set if the slot holds the pick-up for the site, and is clear if not or if the slot is free.
Input
IX Address of the site
IY Address of the slot
Output
F Zero flag set if the slot has the pick-up
CompareSlotWithSite E03D LD A,(IY+$00) Read offset 00 of IY.
E040 INC A Advance A.
E041 JR Z,CompareSlotWithSite_Free Jump to CompareSlotWithSite_Free if the zero flag is set.
E043 LD A,(IX+$00) Read offset 00 of IX.
E046 CP (IY+$01) Return if A is not the byte at offset 01 of IY.
E049 RET NZ
E04A LD A,(IX+$01) Read offset 01 of IX.
E04D CP (IY+$04) Return if A is not the byte at offset 04 of IY.
E050 RET NZ
E051 LD A,(IX+$02) Read offset 02 of IX.
E054 CP (IY+$02) Return if A is not the byte at offset 02 of IY.
E057 RET NZ
E058 LD A,(IX+$03) Read offset 03 of IX.
E05B CP (IY+$05) Compare A with the byte at offset 05 of IY.
E05E RET Return.
CompareSlotWithSite_Free E05F OR %00000001 Set the bits of A that are set in 01.
E061 RET Return.
Prev: DF08 Up: Map Next: E062