Re: errorlevels

 BBS: Inland Empire Archive
Date: 12-22-92 (08:13)             Number: 361
From: ROB MCKEE                    Refer#: NONE
  To: RYAN ADAMS                    Recvd: NO  
Subj: Re: errorlevels                Conf: (2) Quik_Bas
Hi Ryan,

 RA> Ok,  thanks alot for your help.  I will give you a call.
 RA> Thanks again.  Later

Couldn't find the original message..
 QB code fragment:
    TmpBat$ = "QBER" + RIGHT$("0000" + MID$(STR$(TIMER), 2), 6)
    TmpBat% = FREEFILE
    OPEN TmpBat$ FOR OUTPUT AS TmpBat%
    PRINT #TmpBat%, "@echo off"
    PRINT #TmpBat%, ProgramToShell$
    PRINT #TmpBat%, "ERLV.COM>Erlv." + CHR$(26)
    CLOSE TmpBat%
    SHELL TmpBat$
    KILL TmpBat$
    OPEN "Erlv." FOR INPUT AS TmpBat%
    INPUT #TmpBat%, ErLv%
    CLOSE #TmpBat%
    KILL "ErLv."
    PRINT "ErrorLevel was "; ErLv%

  Here's ERLV.COM debug script.

    n erlv.com
    e 0100  E9 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    e 0110  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    e 0120  0D 0A 24 00 54 68 69 73 20 50 72 6F 67 72 61 6D
    e 0130  20 4F 6E 6C 79 20 72 75 6E 73 20 77 69 74 68 20
    e 0140  44 6F 73 35 20 61 6E 64 20 43 4F 4D 4D 41 4E 44
    e 0150  2E 43 4F 4D 0D 0A 24 54 68 69 73 20 50 72 6F 67
    e 0160  72 61 6D 20 48 61 73 20 70 72 6F 62 6C 65 6D 73
    e 0170  0D 0A 24 1E 1E 1E 1E 1E B4 30 CD 21 3D 05 00 74
    e 0180  1C BA 24 01 E8 0C 00 E9 0E 00 BA 57 01 E8 03 00
    e 0190  E9 05 00 B4 09 CD 21 C3 B8 00 4C CD 21 B4 52 CD
    e 01A0  21 4B 4B 89 DE 26 8B 04 2E A3 05 01 8E D8 2E A3
    e 01B0  03 01 3E 8A 26 00 00 8C DB 03 1E 03 00 83 C3 01
    e 01C0  80 FC 5A 74 54 80 FC 4D 74 02 EB BE 1F 1E 89 1E
    e 01D0  0B 01 A1 03 01 8E C0 26 80 3E 08 00 43 75 5A 26
    e 01E0  80 3E 09 00 4F 75 52 26 80 3E 0A 00 4D 75 4A 26
    e 01F0  80 3E 0B 00 4D 75 42 26 80 3E 0C 00 41 75 3A 26
    e 0200  80 3E 0D 00 4E 75 32 26 80 3E 0E 00 44 75 2A 3E
    e 0210  A1 03 01 A3 07 01 E9 20 00 0E 1F A1 07 01 3D 00
    e 0220  00 7F 03 E9 72 FF A1 07 01 05 2B 00 8E C0 26 A0
    e 0230  03 00 3E A2 23 01 E9 07 00 3E A1 0B 01 E9 6C FF
    e 0240  0E 1F B1 30 3C 00 74 16 32 E4 BB 0A 00 F6 F3 88
    e 0250  26 1F 01 32 E4 F6 F3 88 26 1E 01 A2 1D 01 00 0E
    e 0260  1F 01 00 0E 1E 01 00 0E 1D 01 BA 1D 01 E8 23 FF
    e 0270  A0 23 01 B4 4C CD 21
    rcx
    177
    w
    q

 Erlv.a86 source is on the via Netmail.  It's written for
A86 assembler.  It works only with Dos5 and Dos5
Command.com.  The other route is to Exec the program (No
Batch Files) using Int 21h func 4bh and get the return code
using int 21h func 4dh.  But using Qb does hook an awful
lot of interrupts though..  Another solution is to use the
BasWiz Library's QEXEC routine.
                                   TTYL -Rob

--- EZPoint V2.2
 * Origin: Flyer Proof Computer Services (1:125/1212.13)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET