Routines |
Prev: EFD8 | Up: Map | Next: F000 |
Continues from EEE0. Walks each character onto the screen, changes his name (if desired), and walks him off again.
|
||||
EFE0 | LD HL,$7F00 | 7F00 holds the leftmost column of the skool on screen (0-64) | ||
EFE3 | LD B,$08 | There are 8 main characters to consider | ||
EFE5 | LD (HL),B | Set the leftmost column to 8, so that the character can start off-screen (at x=3) and walk on from the left | ||
EFE6 | PUSH BC | Save the character counter | ||
EFE7 | CALL $B0E8 | Print the character's title and name, and walk him onto the screen | ||
EFEA | PUSH HL | Save the message address for the character's name | ||
EFEB | CALL $B6E8 | Print 'PRESS'C'TO CHANGE NAME' and wait for a keypress | ||
EFEE | POP HL | Restore the message address for the character's name | ||
EFEF | CALL Z,$B868 | Change the character's name if 'c' was pressed | ||
EFF2 | JR Z,$EFEF | Change the character's name if 'c' was pressed again | ||
EFF4 | CALL $B5E8 | Walk the character off the screen | ||
EFF7 | POP BC | Restore the character counter to B | ||
EFF8 | DJNZ $EFE6 | Jump back until all 8 main characters have been done | ||
EFFA | LD HL,$611B | Set the instruction at 611B in the routine at 610B back to LD A,(HL) | ||
EFFD | LD (HL),$7E | |||
EFFF | RET |
Prev: EFD8 | Up: Map | Next: F000 |