.TT214 PHA \ Print a space, using the stack to preserve the value JSR TT162 \ of A PLA .TT221 JSR TT27 \ Print the text token in A LDA #225 \ Print recursive token 65 ("(Y/N)?") JSR TT27 JSR TT217 \ Scan the keyboard until a key is pressed, and return \ the key's ASCII code in A and X ORA #%00100000 \ Set bit 5 in the value of the key pressed, which \ converts it to lower case CMP #'y' \ If "y" was pressed, jump to TT218 BEQ TT218 LDA #'n' \ Otherwise jump to TT26 to print "n" and return from JMP TT26 \ the subroutine using a tail call (so all other \ responses apart from "y" indicate a no) .TT218 JSR TT26 \ Print the character in A, i.e. print "y" SEC \ Set the C flag to indicate a "yes" response RTS \ Return from the subroutineName: TT214 [Show more] Type: Subroutine Category: Keyboard Summary: Ask a question with a "Y/N?" prompt and return the responseContext: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * TT210 calls TT214
Arguments: A The text token to print before the "Y/N?" prompt
Returns: C flag Set if the response was "yes", clear otherwise
[X]
Subroutine TT162 (category: Text)
Print a space
[X]
Subroutine TT217 (category: Keyboard)
Scan the keyboard until a key is pressed
[X]
Label TT218 is local to this routine
[X]
Subroutine TT26 (category: Text)
Print a character at the text cursor by poking into screen memory
[X]
Subroutine TT27 (category: Text)
Print a text token