When you terminate a program with an error code (e.g. when pressing CTRL-C), it is possible for the “Press any key to continue” message to appear as if the PAUSE command was used or a /P pager option was passed to a command.
This is because the value at address 6499H (LINES) used by COMMAND2.COM, used to support the /P pager option in some commands, is uninitialised when the program returns with an error. Specifically, this seems to trigger in OUCH. I think REBOOT fails to properly clear this vars area.
I’ve even seen this to cause the “*** CTRL-C pressed” “Terminate batch file (Y/N)?” message to be truncated, probably because other variables (like CHRFLG) are also uninitialised.
A workaround is to set 6499H to 0 before the program terminates.
Test case: pausebug.zip
Just run it from the command line and notice the pause prompt that appears.