Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rice!uw-beaver!sumax!polari!georgf From: georgf@polari.UUCP (George Forsman) Newsgroups: comp.sys.ibm.pc Subject: Re: Setting ERRORLEVEL in DOS Keywords: assembly errorlevel Message-ID: <1462@polari.UUCP> Date: 27 Mar 90 05:53:28 GMT References: <23706@usc.edu> Reply-To: georgf@.UUCP (George Forsman) Distribution: usa Organization: Seattle Online, (206) 328-4944 Lines: 21 In article <23706@usc.edu> wan@pollux.usc.edu (Qiang Wan) writes: >This may be a naive question for all you PC experts. I am trying >to set the ERRORLEVEL to zero in DOS, and couldn't find a way >to accomplish it. I had to use a C program which exits with 0. >Any suggestion is appreciated. Please reply by e-mail. Thanks. > >ching wan You will have to do it with a program, like the one you've written. The simplest one possible follows: mov ax,4c00h int 21h This can be entered in DEBUG and saved as a .COM file. All it does is call the MS-DOS terminate process function with a return code of 0 (the 00 part of 4c00). This version of the program will save the overhead of the C startup code (and is obviously a little bit smaller :) George ...uw-beaver!sumax!polari!georgf