; ; >> MUSICBOX.ZEX 19-Mar-1988 ; ;; This ZEX command file requires support for the following FCP functions. ;; IF, NULL, EXIST, ERROR, ELSE, FI and negate (~). ;; The CLI is expected to support ERA and TYPE. ;; ;; The SLR assembler (Z80ASM) and linker (SLRNKP) are expected to be available ;; along the current path. If you do not have SLRNKP (the expensive one), ;; then I strongly recommend that you buy it - however if you place SLRNK in ;; the current directory then it will be used instead. ;; ;; If VLIB.REL, SYSLIB and Z3LIB are available in the current directory then ;; a ZCPR3 video orientated version of the program will be built, otherwise ;; a standard CP/M 2.2 compatible version is output. ;; ;; When this command file is invoked it expects a single name as a parameter, ;; if this file does not exist (or no parameter is given) then no assemblies ;; or links will be performed and the file will exit after displaying the ;; information text file. ;; If the parameter is found to match an existing file then all the required ;; modules (including any recently edited) will be assembled, linked and ;; backup files purged to produce a .COM file output. This output file will ;; generate music (?) on a nearby radio when run. ;; ; - Check file exists. IF EXIST $1.Z80 ; - Clean up old files. IF EXIST $1.SYM ERA $1.SYM FI IF EXIST $1.XRF ERA $1.XRF FI IF EXIST $1.LST ERA $1.LST FI IF EXIST $1.COM ERA $1.COM FI ; - Start assemblies. IF EXIST CPM.BAK Z80ASM CPM/RSXF IF ~ERROR ERA CPM.BAK FI FI IF ~EXIST CPM.REL Z80ASM CPM/RSXF FI ; - Determine version to build. IF EXIST VLIB.REL,SYSLIB.REL,Z3LIB.REL IF EXIST ZMUSIC.BAK Z80ASM ZMUSIC/RSXF IF ~ERROR ERA ZMUSIC.BAK FI FI IF ~EXIST ZMUSIC.REL Z80ASM ZMUSIC/RSXF FI IF EXIST MUTILS.BAK Z80ASM MUTILS/RSXF IF ~ERROR ERA MUTILS.BAK FI FI IF ~EXIST MUTILS.REL Z80ASM MUTILS/RSXF FI ELSE IF EXIST MUSIC.BAK Z80ASM MUSIC/RSXF IF ~ERROR ERA MUSIC.BAK FI FI IF ~EXIST MUSIC.REL Z80ASM MUSIC/RSXF FI FI ; - Create $1.REL IF EXIST $1.BAK Z80ASM $1/RSXF IF ~ERROR ERA $1.BAK FI FI IF ~EXIST $1.REL Z80ASM $1/RSXF FI ; - Taskbuild $1. IF EXIST VLIB.REL,SYSLIB.REL,Z3LIB.REL IF EXIST SLRNK.COM SLRNK $1/N,$1/M,/V,ZMUSIC,MUTILS,CPM,$1,/E ELSE SLRNKP $1/N,$1/M:4,$1/X:4,/V,ZMUSIC,MUTILS,CPM,$1,/E FI FI IF ~EXIST VLIB.REL,SYSLIB.REL,Z3LIB.REL IF EXIST SLRNK.COM SLRNK $1/N,$1/M,/V,MUSIC,CPM,$1,/E ELSE SLRNKP $1/N,$1/M:4,$1/X:4,/V,MUSIC,CPM,$1,/E FI FI ELSE TYPE MUSICBOX.INF FI ; << MUSICBOX.ZEX End.