|  | Routines | 
| Prev: AE17 | Up: Map | Next: AE6E | 
| 
Used by the routine at AE17.
 | ||||
| AE3C | LD HL,($AF5D) | HL=*AF5D. | ||
| AE3F | PUSH HL | Stash HL and BC on the stack. | ||
| AE40 | PUSH BC | |||
| AE41 | LD B,$03 | B=03. | ||
| AE43 | PUSH BC | Stash BC and DE on the stack. | ||
| AE44 | PUSH DE | |||
| AE45 | LD A,(DE) | A=*DE. | ||
| AE46 | CP $20 | Jump to AE5B if A is equal to 20. | ||
| AE48 | JR Z,$AE5B | |||
| AE4A | ADD A,A | Multiply A by 02. | ||
| AE4B | LD HL,$AF5F | HL=AF5F. | ||
| AE4E | LD E,A | Create an offset in DE. | ||
| AE4F | LD D,$00 | |||
| AE51 | ADD HL,DE | HL+=DE. | ||
| AE52 | LD E,(HL) | Fetch the address at *HL and load it into DE. | ||
| AE53 | INC HL | |||
| AE54 | LD D,(HL) | |||
| AE55 | PUSH DE | IX=DE (using the stack). | ||
| AE56 | POP IX | |||
| AE58 | CALL $AE6E | Call AE6E. | ||
| AE5B | POP DE | Restore DE from the stack. | ||
| AE5C | INC DE | Increment DE by one. | ||
| AE5D | LD HL,($AF5D) | HL=*AF5D. | ||
| AE60 | INC L | Increment L by two. | ||
| AE61 | INC L | |||
| AE62 | LD ($AF5D),HL | Write HL to *AF5D. | ||
| AE65 | POP BC | Restore BC from the stack. | ||
| AE66 | DJNZ $AE43 | Decrease counter by one and loop back to AE43 until counter is zero. | ||
| AE68 | POP BC | Restore BC and HL from the stack. | ||
| AE69 | POP HL | |||
| AE6A | LD ($AF5D),HL | Write HL to *AF5D. | ||
| AE6D | RET | Return. | ||
| Prev: AE17 | Up: Map | Next: AE6E |