home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1992 / 18 / dba.bat < prev    next >
DOS Batch File  |  1991-01-27  |  880b  |  34 lines

  1. @echo off
  2.   if exist %1.DBA goto :PREP
  3.     if not '%1'=='' echo File does not exist: %1.DBA
  4.     echo PASS 1='DBA name'   PASS 2='DBA name length'
  5.     goto :EXIT
  6. :PREP
  7.   echo>@1@ A 100
  8.   echo>@2@ ;____;;END: LENGTH = (END-0100H)
  9.   echo>>@2@/
  10.   if '%2'=='' goto :PASS1
  11.     echo>>@2@ U 100 L %2
  12.     echo>>@2@ D 100 L %2
  13.     echo>>@2@ RCX
  14.     echo>>@2@ %2
  15.     echo>>@2@ N %1.COM
  16.     echo>>@2@ W
  17. :PASS1
  18.   echo>>@2@ Q
  19.   copy @1@+%1.DBA+@2@ @3@ >nul
  20.   debug <@3@ >%1.DBL
  21.   find <%1.DBL " ^ Error" > @4@
  22.   copy @4@ @5@ >nul
  23.   if not exist @5@ goto :NOERR
  24.     if exist %1.com del %1.com
  25.     type %1.dbl
  26.     echo ==== Fix DEBUG syntax errors and re-run this pass
  27.     goto :exit
  28. :NOERR
  29.   find <%1.DBL ";;"
  30.   if     '%2'=='' echo ==== PASS 1: If addresses ok: DBA %1 LENGTH
  31.   if not '%2'=='' echo ==== PASS 2: If addresses ok: %1
  32. :EXIT
  33.   if exist @?@ del @?@
  34.