| Routines

46568: Guide a character onto the catwalk or off it

Used by the routines at 46056 and 61408. Makes a character walk in from the left to the middle of the screen (at which point his name may be changed), or from the middle of the screen and off to the right.
46568 | LD B,38 | The character will take 38 steps along the catwalk
46570 | PUSH BC |
46571 | LD H,152 | This instruction is set by the routine at 45429 to either 'LD H,152' (boy) or 'LD H,164' (teacher) as appropriate
46573 | CALL 46312 | Move the character one step along the catwalk
46576 | CALL 65088 | Make a walking sound effect
46579 | LD C,100 | Pause briefly between steps
46581 | DJNZ 46581
46583 | DEC C
46584 | JR NZ,46581
46586 | POP BC |
46587 | DJNZ 46570 | Jump back until 38 steps have been taken
46589 | RET |