![]() |
Routines |
| Prev: 9A7E | Up: Map | Next: 9A9A |
|
Used by the routines at CompletePlanet and StartNewGame.
Applies a mask to every byte of the table at MapTable.
|
||||||||
| MaskMapTable | 9A8A | LD BC,$0122 | Set the number of bytes in BC. | |||||
| 9A8D | LD HL,$5C94 | Use the table. | ||||||
| MaskMapTable_Loop | 9A90 | LD A,(HL) | Fetch a byte of the table. | |||||
| 9A91 | AND E | Apply the mask. | ||||||
| 9A92 | LD (HL),A | Store the byte. | ||||||
| 9A93 | INC HL | Move on to the next one. | ||||||
| 9A94 | DEC BC | Decrease the counter. | ||||||
| 9A95 | LD A,B | Combine B and C. | ||||||
| 9A96 | OR C | |||||||
| 9A97 | JR NZ,MaskMapTable_Loop | Jump back to MaskMapTable_Loop until the counter is zero. | ||||||
| 9A99 | RET | Return. | ||||||
| Prev: 9A7E | Up: Map | Next: 9A9A |