Prev: 75A3 Up: Map Next: 75C2
75A4: Check whether Sam is standing next to a fuse that has not been blown yet
Used by the routines at 7425 and 74AA. Returns with the zero flag set if Sam is standing next to a fuse that has not been blown yet.
Input
H 0xE6 (Sam)
75A4 LD DE,$73C3 Point DE at the fuse location table at 73C3
75A7 LD L,$02 Point HL at byte 0x02 of Sam's buffer
75A9 LD BC,$0601 B=6 (there are six fuses), C=1 (fuse identifier)
75AC LD A,(DE) A=y-coordinate of a fuse
75AD INC DE Point DE at the x-coordinate of the fuse
75AE CP (HL) Does the fuse's y-coordinate match Sam's y-coordinate?
75AF JR NZ,$75BC Jump if not
75B1 DEC L Point HL at byte 0x01 of Sam's buffer
75B2 LD A,(DE) A=x-coordinate of the fuse
75B3 CP (HL) Compare it with Sam's x-coordinate
75B4 INC HL Point HL back at byte 0x02 of Sam's buffer
75B5 JR NZ,$75BC Jump unless Sam is standing next to the fuse
75B7 LD A,($7FB6) Collect the fuse flags from 7FB6
75BA AND C Set the zero flag if the fuse has not been blown yet
75BB RET
75BC RLC C Move the fuse identifier bit in C leftwards
75BE INC DE Point DE at the next entry in the fuse location table
75BF DJNZ $75AC Jump back until all fuse locations have been checked
75C1 RET
Prev: 75A3 Up: Map Next: 75C2