You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 inOUCH
. I thinkREBOOT
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
to0
before the program terminates.Test case: pausebug.zip
Just run it from the command line and notice the pause prompt that appears.
The text was updated successfully, but these errors were encountered: