![]() |
Routines |
Prev: 30115 | Up: Map |
|
|||||||||
30116 | LD DE,29635 | Point DE at the fuse location table at 29635 | |||||||
30119 | LD L,2 | Point HL at byte 2 of Sam's buffer | |||||||
30121 | LD BC,1537 | B=6 (there are six fuses), C=1 (fuse identifier) | |||||||
30124 | LD A,(DE) | A=y-coordinate of a fuse | |||||||
30125 | INC DE | Point DE at the x-coordinate of the fuse | |||||||
30126 | CP (HL) | Does the fuse's y-coordinate match Sam's y-coordinate? | |||||||
30127 | JR NZ,30140 | Jump if not | |||||||
30129 | DEC L | Point HL at byte 1 of Sam's buffer | |||||||
30130 | LD A,(DE) | A=x-coordinate of the fuse | |||||||
30131 | CP (HL) | Compare it with Sam's x-coordinate | |||||||
30132 | INC HL | Point HL back at byte 2 of Sam's buffer | |||||||
30133 | JR NZ,30140 | Jump unless Sam is standing next to the fuse | |||||||
30135 | LD A,(32694) | Collect the fuse flags from 32694 | |||||||
30138 | AND C | Set the zero flag if the fuse has not been blown yet | |||||||
30139 | RET | ||||||||
30140 | RLC C | Move the fuse identifier bit in C leftwards | |||||||
30142 | INC DE | Point DE at the next entry in the fuse location table | |||||||
30143 | DJNZ 30124 | Jump back until all fuse locations have been checked | |||||||
30145 | RET |
Prev: 30115 | Up: Map |