home *** CD-ROM | disk | FTP | other *** search
- Example of Using Expand & TASM on PC
- 2nd September 1992 .
-
- There are a number of 'bells & Whistles' in this file, but it is
- the sort of thing that I use for my standard production builds
- on the PC.
-
- The TASM in question (called XASM here because I also use borland's
- TASM assembler) is front-ended by EXPAND.EXE
-
- EXPAND processes the traditional MACRO constructs, evaluates
- expressions that involve long (32 bit) constants, and does all the
- #INCLUDE file stuff.
-
- XASM gets just one partially processed file (perhaps with comments
- stripped).
-
- TASM can of course be used on it's own, and EXPAND.EXE is not as
- vital as it was, since this lot was designed to use the 1986
- version of TASM which has been improved & extended a lot since
- then.
-
- All the switches for TASM are described in the standard Doc.
-
- **NB no source code for Tasm! get that from Tom Anderson.
-
- All the switches for EXPAND are described in the source code.
-
-
- @ECHO OFF
- CLS
- ECHO.
- ECHO ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- ECHO º MAPLE-ARC. TRANSFER 80C51 BOX º
- ECHO ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
- ECHO.
- FKEYS ALT-F1 "LIST LST\%1.LST"
- FKEYS ALT-F2 "AS ASM\%..ASM"
- ECHODRV >%U_TEMP%$R$.BAT
- ECHOCD >>%U_TEMP%$R$.BAT
- CD >>%U_TEMP%$R$.BAT
- REM
- IF %2.==. GOTO NO_BIN_1
- SET BO=%2
- GOTO BIN_1
- :NO_BIN_1
- SET BO=%1
- :BIN_1
- ECHO * Making Program %1 to Binary %BO%.BIN
- ECHO.
- ECHO ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- ECHO º ASSEMBLING %1.ASM
- ECHO ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
- ECHO.
- EXPAND /I:ASM\%1.ASM /O:ASM\%1.TMP +M +U /W:R.J.P.
- IF NOT ERRORLEVEL 1 GOTO ASSY
- ECHO ayeessemm slash %1 dot ayeessemm Macro Expansion Failed >say.tmp
- say_file -d1 10 -d2 30 say.tmp
- GOTO F_FIN
- :ASSY
- XASM -51 -c -b -l -fff ASM\%1.TMP BIN\%BO%.BIN LST\%1.LST > T.err
- xasmend < T.err
- IF NOT ERRORLEVEL 1 GOTO FIN
- ECHO ayeessemm dot %1 dot ayeessemm Assembly Failed >say.tmp
- say_file -d1 10 -d2 30 say.tmp
- list t.err
- GOTO F_FIN
- :FIN
- REM del T.err
- del asm\%1.TMP
- ECHO bin slash %1 dot bin Created Successfully >say.tmp
- say_file -d1 10 -d2 30 say.tmp
- REM
- C:
- CD BIN
- :PROM_OPTION
- ECHO.
- ECHO ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- ECHO º PROM (2764) Burning Process: º
- ECHO º If 'N' Reply to 12.5 V Prom , º
- ECHO º then F1 will be programmed to º
- ECHO º reset to 21V. º
- ECHO º In Prom Burner Program, º
- ECHO º F1 Loads the file, º
- ECHO º F2 Sets the Address (Enter) needed º
- ECHO º F3 Starts the Programming. º
- ECHO º ----------------------- º
- ECHO º Using 12.5 V Prom ? º
- ECHO ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
- ECHO.
- BATCHKEY "YNQ"
- IF ERRORLEVEL 3 GOTO P_FIN
- IF ERRORLEVEL 2 GOTO HI_V
- IF ERRORLEVEL 1 GOTO LOW_V
- GOTO PROM_OPTION
- :HI_V
- FKEYS F1 "UUU2%BO%.BIN"*
- GOTO BLAST
- :LOW_V
- FKEYS F1 "2%BO%.BIN"*
- :BLAST
- FKEYS F2 "0"*
- FKEYS F3 "AY"*
- EPPGM4
- :P_FIN
- CALL %U_TEMP%$R$.BAT
- DEL %U_TEMP%$R$.BAT
- GOTO EX
- :F_FIN
- ECHO %1.ASM Build Failed >say.tmp
- say_file -d1 10 -d2 30 say.tmp
- GOTO EX
- :EX
- FKEYS F1
- FKEYS F2
- FKEYS F3
- SET BO=
- ECHO.
-
-