Article View: comp.os.msdos.programmer
Article #1755errorlevel/exit codes
From: 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."
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<5613@darkstar.ucsc.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!ucbvax!agate!darkstar!helios!tedShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!ucbvax!agate!darkstar!helios!ted From: ted@helios.ucsc.edu (Ted Cantrall) Newsgroups: comp.os.msdos.programmer Subject: errorlevel/exit codes Message-ID: <5613@darkstar.ucsc.edu> Date: 1 Aug 90 14:57:51 GMT Sender: usenet@darkstar.ucsc.edu Reply-To: ted@helios.ucsc.edu (Ted Cantrall) Organization: UCO/Lick Observatory, Santa Cruz Lines: 24