Category : BASIC Source Code
Archive   : ERRLVLM.ZIP
Filename : READ.ME

 
Output of file : READ.ME contained in archive : ERRLVLM.ZIP


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
are accessed.

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
results.

Compile BASEXIT.BAS with BC.EXE like this...

bc basexit/o;

Then, link the resulting Basexit.obj with Cexit.obj something like
this...

Link basexit+cexit,,,,

OR...

Link basexit+cexit

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.

enjoy.



  3 Responses to “Category : BASIC Source Code
Archive   : ERRLVLM.ZIP
Filename : READ.ME

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/