![]() |
Routines |
Prev: B87F | Up: Map |
Continues from B868. Returns with the zero flag set if 'c' was pressed after entering the character's name.
|
||||||||||||
B8E8 | RES 5,(HL) | Signal: no key pressed | ||||||||||
B8EA | LD H,D | Set HL to the message address for the character's name | ||||||||||
B8EB | LD L,E | |||||||||||
B8EC | CALL $B7E8 | Collect a keypress | ||||||||||
B8EF | JR Z,$B8F8 | Jump forward if ENTER was pressed | ||||||||||
B8F1 | CP $0D | Have 13 characters been typed? | ||||||||||
B8F3 | JR NZ,$B8EC | Jump back to collect another keypress if not | ||||||||||
B8F5 | DEC E | Set the character name message address offset back to 12 to avoid overflow (any subsequent keypresses will be stored at that offset) | ||||||||||
B8F6 | JR $B8EC | |||||||||||
B8F8 | PUSH HL | Save the message address | ||||||||||
B8F9 | CALL $B6E8 | Print 'PRESS'C'TO CHANGE NAME' and wait for a keypress | ||||||||||
B8FC | POP HL | Restore the character name message address to HL | ||||||||||
B8FD | RET |
Prev: B87F | Up: Map |