choice
Wait for keypress and set ERRORLEVEL in batch scripts. More information: https://www.dosbox.com/wiki/Commands#CHOICE.
ERRORLEVEL
CHOICE "{{prompt}}"