I'm writing a text adventure in assembly for the Apple IIe (using Merlin). I'm also using ProDOS 8 v2.0.3. At some point, I have a subroutine to read user input from the keyboard using the
GETLN1 call. It works as expected, except in cases where the user input coincides with a ProDOS command; for example, if the user types:
I get a "
SYNTAX ERROR" message and my program exits back to the BASIC prompt. It seems that it tries to validate the syntax of the ProDOS command
DOOR is obviously not a valid parameter). If I type some other commands (e.g.
OPEN) I have similar results.
GETLN subroutine was meant to just read user input to the keyboard buffer and return to the caller. But it seems to be also checking if the input matches a ProDOS command, and attempting to validate its syntax. I don't want that behavior, I just want to read a line of user input from the keyboard.
Here's a snippet from my code:
GETLN1 equ $FD6F
InputString jsr GETLN1
lda #$E5 ; DEBUG
jsr PRBYTE ; OUTPUT
Note: if I type a ProDOS command string like
OPEN, my program exits before printing the debug output above. If I type anything else, it prints the debug output and proceeds as expected.
Does anyone know what is going on and how can I work around this problem?