Thread View: comp.os.msdos.programmer
1 messages
1 total messages
Started by Ted Cantrall
Wed, 01 Aug 1990 14:57
errorlevel/exit codes
Author: Ted Cantrall
Date: Wed, 01 Aug 1990 14:57
Date: Wed, 01 Aug 1990 14:57
24 lines
1723 bytes
1723 bytes
After several failed attempts to solve this as a novice asslembly
programmer, I'm ready to say "HELP".
In a batch file, the status of the
privious command (some of them, anyway) can be tested via the
IF ERRORLEVEL command. I would like to be able to print to the screen
the errorlevel returned by a command as a part of debugging that command.
Using the IF ERRORLEVEL can be very tiresome if the routine is NOT
returning what is expected. So far, I have found that the errorlevel is
returned as an exit code in the AL register, but what happpens after that
I can only guess (and none of my guesses have been right, yet).
I've tried to too-obvious tactic of following the command in question
with a routine that prints the contents of the AL reg, but the batch
processing must change the AL, because it is always 00.
------ ------
Can some kind soul tell me how to access the errorlevel without going
to the extreme of dissassembling COMMAND.COM?
Many thanks to all who respond, -ted-
-------------------------------------------------------------------------------
ted@helios.ucsc.edu | "If I get any phone calls while I'm gone,
(408)459-2110 | just don't answer them."
-------------------------------------------------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads