Routines |
Prev: AC69 | Up: Map | Next: AC7F |
|
||||||||||||
AC6C | OR A | Is the current room 0? | ||||||||||
AC6D | RET Z | Return if it is, something's gone wrong. | ||||||||||
Looks like a valid room, so work out the address to return by counting the number of END (FF) characters.
|
||||||||||||
AC6E | PUSH BC | Remember BC and DE. | ||||||||||
AC6F | PUSH DE | |||||||||||
AC70 | LD E,A | Put the room number in E as the number of matches to find. | ||||||||||
AC71 | LD A,$FF | Search for FF. | ||||||||||
AC73 | LD BC,$0000 | Search the entire memory. | ||||||||||
AC76 | CPIR | Look for it. | ||||||||||
AC78 | DEC E | Reduce the number of matches to find. | ||||||||||
AC79 | JP NZ,$AC76 | Jump back if there are more entries to look for. | ||||||||||
AC7C | POP DE | Restore DE and BC and return. | ||||||||||
AC7D | POP BC | |||||||||||
AC7E | RET |
Prev: AC69 | Up: Map | Next: AC7F |