\ --- Mod: Code added for Elite-A: --------------------> .confirm CMP save_lock \ If A = save_lock, jump to confirmed to return from the BEQ confirmed \ subroutine without asking for confirmation, but \ assuming a positive response LDA #3 \ Print extended token 3 ("ARE YOU SURE?") JSR DETOK JSR t \ Scan the keyboard until a key is pressed, returning \ the ASCII code in A and X JSR CHPR \ Print the character in A ORA #%00100000 \ Set bit 5 in the value of the key pressed, which \ converts it to lower case PHA \ Store A on the stack so we can retrieve it after the \ call to FEED JSR TT67 \ Print a newline JSR FEED \ Print a newline PLA \ Restore A from the stack CMP #'y' \ Set the C flag if A >= ASCII y' (i.e. if "Y" was \ pressed and not "N"), otherwise clear it .confirmed RTS \ Return from the subroutine \ --- End of added code ------------------------------->Name: confirm [Show more] Type: Subroutine Category: Save and load Summary: Print "ARE YOU SURE?" and wait for a responseContext: See this subroutine in context in the source code References: This subroutine is called as follows: * SVE calls confirm
Arguments: A If save_lock matches this value, then we do not ask for confirmation and instead assume the answer was "Y"
Returns: Z flag If "Y" is pressed, then BEQ will branch (Z flag is set), otherwise BNE will branch (Z flag is clear)
[X]
Subroutine CHPR (category: Text)
Print a character at the text cursor by poking into screen memory
[X]
Subroutine DETOK (category: Text)
Print an extended recursive token from the TKN1 token table
[X]
Subroutine FEED (category: Text)
Print a newline
[X]
Subroutine TT67 (category: Text)
Print a newline
[X]
Label confirmed is local to this routine
[X]
Configuration variable save_lock = &0233
This flag indicates whether we should be asking for confirmation before saving or loading a commander file