![]() |
Routines |
Prev: 52235 | Up: Map | Next: 52265 |
|
||||||||||||||||
Stash some registers so they don't get corrrupted.
|
||||||||||||||||
FindCharacter | 52238 | PUSH DE | Stash DE and BC on the stack. | |||||||||||||
52239 | PUSH BC | |||||||||||||||
52240 | LD C,A | Store the character ID in C. | ||||||||||||||
52241 | LD DE,8 | Load the length of the character data 0008 bytes into DE. | ||||||||||||||
52244 | LD IY,39008 | IY=Table_Timetable. | ||||||||||||||
FindCharacter_Loop | 52248 | LD A,(IY+0) | Fetch the current characters ID from the timetable pointer. | |||||||||||||
52251 | CP C | Jump to FindCharacter_Return if this character ID and the requested character ID match. | ||||||||||||||
52252 | JR Z,FindCharacter_Return | |||||||||||||||
52254 | CP 255 | Jump to FindCharacter_Return if the termination character has been reached (255). | ||||||||||||||
52256 | JR Z,FindCharacter_Return | |||||||||||||||
52258 | ADD IY,DE | Add 0008 bytes to the timetable pointer to move to the next set of character data. | ||||||||||||||
52260 | JR FindCharacter_Loop | Jump to FindCharacter_Loop. | ||||||||||||||
Return with some housekeeping.
|
||||||||||||||||
FindCharacter_Return | 52262 | POP BC | Restore BC and DE from the stack. | |||||||||||||
52263 | POP DE | |||||||||||||||
52264 | RET | Return. |
Prev: 52235 | Up: Map | Next: 52265 |