Contents of the READ.ME file
Within this archive are three files (not counting this .DOC).
BASEXIT.BAS, CEXIT.OBJ and TESTEXIT.BAT.
BASEXIT.BAS is a sample basic program to show you how the errorlevels
CEXIT.OBJ is the compiled C source that contains the exit() function.
TESTEXIT.BAT is just a sample batch file so you may test a couple of
errorlevels to see that it really works. I cannot include a tutorial
on batch files, so if you don't understand errorlevels I suggest you
check your dos manual. If you use the errorlevels shown in the batch
file, you'll see that it works just fine. If you use something else
and you're not familiar with batch files, you may be confused by the
Compile BASEXIT.BAS with BC.EXE like this...
Then, link the resulting Basexit.obj with Cexit.obj something like
and answer the prompts that LINK will provide.
Once you have BASEXIT.EXE, run TESTEXIT.BAT and answer the prompt with
an errorlevel of 25, 10 or 0 and you'll see the result. BASEXIT is
not a very exciting program, and TESTEXIT.BAT could have contained all
255 errorlevels, but I didn't see the point in that. You should be
able to get the idea from what I've included.
So far this seems to be working just fine for me with QuickBasic 4.0
on a Tandy 1000 and a XT clone. I'm sure this will only work on
QuickBasic programs compiled as STAND-ALONE, that is, not requiring
BRUN40.EXE to run.