home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / assembler / tasm / PC_BAT / LBU_BAT next >
Encoding:
Text File  |  1992-09-02  |  3.8 KB  |  120 lines

  1.         Example of Using Expand & TASM on PC
  2.          2nd September 1992  .
  3.          
  4.          There are a number of 'bells & Whistles' in this file, but it is
  5.          the sort of thing that I use for my standard production builds
  6.          on the PC.
  7.          
  8.          The TASM in question (called XASM here because I also use borland's
  9.          TASM assembler) is front-ended by EXPAND.EXE
  10.          
  11.          EXPAND processes the traditional MACRO constructs, evaluates
  12.          expressions that involve long (32 bit) constants, and does all the
  13.          #INCLUDE file stuff.
  14.          
  15.          XASM gets just one partially processed file (perhaps with comments
  16.          stripped).
  17.          
  18.          TASM can of course be used on it's own, and EXPAND.EXE is not as
  19.          vital as it was, since this lot was designed to use the 1986 
  20.          version of TASM which has been improved & extended a lot since
  21.          then.
  22.          
  23.          All the switches for TASM are described in the standard Doc.
  24.          
  25.          **NB no source code for Tasm! get that from Tom Anderson.
  26.          
  27.          All the switches for EXPAND are described in the source code.
  28.  
  29.  
  30. @ECHO OFF
  31. CLS
  32. ECHO.
  33. ECHO          ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  34. ECHO          º     MAPLE-ARC. TRANSFER 80C51 BOX       º
  35. ECHO          ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  36. ECHO.
  37.         FKEYS ALT-F1 "LIST LST\%1.LST"
  38.         FKEYS ALT-F2 "AS ASM\%..ASM"
  39.         ECHODRV  >%U_TEMP%$R$.BAT
  40.         ECHOCD   >>%U_TEMP%$R$.BAT
  41.         CD       >>%U_TEMP%$R$.BAT
  42. REM
  43. IF %2.==.  GOTO  NO_BIN_1
  44.         SET  BO=%2
  45.         GOTO    BIN_1
  46. :NO_BIN_1
  47.         SET  BO=%1
  48. :BIN_1
  49. ECHO    *  Making  Program %1 to Binary %BO%.BIN
  50. ECHO.
  51. ECHO          ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  52. ECHO          º     ASSEMBLING  %1.ASM
  53. ECHO          ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  54. ECHO.
  55.         EXPAND /I:ASM\%1.ASM /O:ASM\%1.TMP +M +U /W:R.J.P.
  56.         IF NOT ERRORLEVEL 1 GOTO ASSY
  57.         ECHO ayeessemm slash %1 dot ayeessemm  Macro Expansion Failed >say.tmp
  58.         say_file -d1 10 -d2 30 say.tmp
  59.         GOTO F_FIN
  60. :ASSY
  61.         XASM   -51 -c -b -l -fff ASM\%1.TMP BIN\%BO%.BIN LST\%1.LST > T.err
  62.         xasmend < T.err 
  63.         IF NOT ERRORLEVEL 1 GOTO FIN
  64.         ECHO ayeessemm dot %1 dot ayeessemm Assembly Failed >say.tmp
  65.         say_file -d1 10 -d2 30 say.tmp
  66.         list t.err
  67.         GOTO F_FIN
  68. :FIN
  69. REM     del  T.err
  70.         del  asm\%1.TMP
  71.         ECHO bin slash %1 dot bin Created Successfully >say.tmp
  72.         say_file -d1 10 -d2 30 say.tmp
  73. REM
  74.         C:
  75.         CD  BIN
  76. :PROM_OPTION
  77. ECHO.
  78. ECHO          ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  79. ECHO          º     PROM (2764) Burning Process:        º
  80. ECHO          º     If 'N' Reply to 12.5 V Prom ,       º
  81. ECHO          º     then F1 will be programmed to       º
  82. ECHO          º     reset to 21V.                       º
  83. ECHO          º     In Prom Burner Program,             º
  84. ECHO          º     F1 Loads the file,                  º
  85. ECHO          º     F2 Sets the Address (Enter) needed  º
  86. ECHO          º     F3 Starts the Programming.          º
  87. ECHO          º          -----------------------        º
  88. ECHO          º     Using 12.5 V Prom ?                 º
  89. ECHO          ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  90. ECHO.
  91.         BATCHKEY  "YNQ"
  92.         IF ERRORLEVEL 3 GOTO  P_FIN
  93.         IF ERRORLEVEL 2 GOTO  HI_V
  94.         IF ERRORLEVEL 1 GOTO  LOW_V
  95.         GOTO PROM_OPTION
  96. :HI_V
  97.         FKEYS F1 "UUU2%BO%.BIN"*
  98.         GOTO BLAST
  99. :LOW_V
  100.         FKEYS F1 "2%BO%.BIN"*
  101. :BLAST
  102.         FKEYS F2 "0"*
  103.         FKEYS F3 "AY"*
  104.         EPPGM4
  105. :P_FIN
  106.         CALL  %U_TEMP%$R$.BAT
  107.         DEL   %U_TEMP%$R$.BAT
  108.         GOTO EX
  109. :F_FIN
  110.         ECHO  %1.ASM Build Failed >say.tmp
  111.         say_file -d1 10 -d2 30 say.tmp
  112.         GOTO EX
  113. :EX
  114.         FKEYS F1
  115.         FKEYS F2
  116.         FKEYS F3
  117.         SET BO=
  118. ECHO.
  119.  
  120.