Routines |
Prev: 8146 | Up: Map | Next: 81D4 |
Used by the routine at 8055.
|
||||
Starting with the first location, London.
|
||||
FlashLocationMapPoints | 81B3 | LD IX,$8E82 | IX=London_Location. | |
81B7 | LD B,$0E | Set a counter in B for the total number of locations (0E). | ||
FlashLocationMapPoints_Loop | 81B9 | PUSH BC | Stash the locations count on the stack. | |
81BA | LD L,(IX+$02) | Load the map co-ordinates for the current location into HL. | ||
81BD | LD H,(IX+$03) | |||
81C0 | CALL ToggleMapPoint | Call ToggleMapPoint. | ||
81C3 | LD DE,$0016 | Add 0016 to IX which is a safe place to land to find the next location. | ||
81C6 | ADD IX,DE | |||
All locations end with the string for the location name, so now move through the string to find the terminating bit. This is necessary as the location names have varying lengths.
|
||||
CheckTerminator_Loop | 81C8 | BIT 7,(IX+$00) | Test bit 7 of *IX+00. | |
81CC | INC IX | Increment IX by one. | ||
81CE | JR Z,CheckTerminator_Loop | Keep jumping back to CheckTerminator_Loop until the terminating bit 7 is found. | ||
81D0 | POP BC | Restore the locations count from the stack. | ||
81D1 | DJNZ FlashLocationMapPoints_Loop | Decrease the locations count by one and loop back to FlashLocationMapPoints_Loop until locations have been processed. | ||
81D3 | RET | Return. |
Prev: 8146 | Up: Map | Next: 81D4 |