|  | Routines | 
| Prev: D056 | Up: Map | Next: D096 | 
| 
 
 | ||||||||||||||
| D06C | PUSH HL | Save HL and BC | ||||||||||||
| D06D | PUSH BC | |||||||||||||
| D06E | LD A,(HL) | Set A to the tile type pointed by HL | ||||||||||||
| D06F | LD B,$04 | Set B to the number of tiles of type 'wall' | ||||||||||||
| D071 | LD HL,$D096 | Set HL to the address pointer of the list of tiles 'wall' | ||||||||||||
| 
Check if the tile type in A is in the list of B elements pointed by HL
 | ||||||||||||||
| D074 | LD C,$FF | Check if A is equal to (HL) | ||||||||||||
| D076 | CPI | |||||||||||||
| D078 | JP Z,$D085 | Jump if so | ||||||||||||
| D07B | DJNZ $D076 | Jump back and check next element | ||||||||||||
| 
is not in the list
 | ||||||||||||||
| D07D | POP BC | Restore BC | ||||||||||||
| D07E | POP HL | Restore HL | ||||||||||||
| D07F | LD A,$01 | Set flag Z=0 | ||||||||||||
| D081 | OR A | |||||||||||||
| D082 | LD A,$00 | Set A = $00 | ||||||||||||
| D084 | RET | |||||||||||||
| 
is in the list
 | ||||||||||||||
| D085 | XOR A | Set flag Z=1 | ||||||||||||
| D086 | DEC HL | Set A to the tile type found | ||||||||||||
| D087 | LD A,(HL) | |||||||||||||
| D088 | POP BC | Restore BC and HL | ||||||||||||
| D089 | POP HL | |||||||||||||
| D08A | RET | |||||||||||||
| D08B | PUSH HL | Save HL and BC | ||||||||||||
| D08C | PUSH BC | |||||||||||||
| D08D | LD A,(HL) | Set A to the tile type pointed by HL | ||||||||||||
| D08E | LD B,$06 | Set B to the number of tiles of type 'background' | ||||||||||||
| D090 | LD HL,$D09A | Set HL to the address pointer of the list of tiles 'background' | ||||||||||||
| D093 | JP $D074 | |||||||||||||
| Prev: D056 | Up: Map | Next: D096 |