home *** CD-ROM | disk | FTP | other *** search
- echo off
- cls
- echo MASM2COM.BAT - Assemble a source file, link, convert to a .COM file.
- echo
- timemark start /n
- if %1! == ! goto oops1
- if exist %1 goto oops2
- echo Assemble %1.ASM to create %1.OBJ
- masm %1,%1,%1;
- if errorlevel == 1 goto error
- echo Link %1.OBJ to create %1.EXE
- link %1 ;
- echo LINK normally issues a missing STACK segment warning here.
- echo
- del %1.COM
- echo Attempt to convert %1.EXE to %1.COM
- exe2bin %1 %1.com
- if not exist %1.com goto end
- del %1.obj
- del %1.exe
- echo %1.COM was created, the %1.OBJ and %1.EXE files were deleted.
- goto end
- :error
- echo -- Assembly error, %1.OBJ not created, see %1.LST for errors. --
- goto end2
- :oops2
- echo -- The filename %1 exists as entered. --
- goto end2
- :oops1
- echo -- No source filename was entered. --
- :end2
- echo
- echo ╔════════════════════════════════════════════════════════════════╗
- echo ║ The assembly source file name MUST have a .ASM extension. ║
- echo ║ The .ASM extension MUST NOT be entered with the file name. ║
- echo ║ A file with the same name and no extension will show as error. ║
- echo ║ The usage is: MASM2COM filename ║
- echo ╚════════════════════════════════════════════════════════════════╝
- :end
- echo
- echo
- echo
- echo
- timemark stop /n /l
- echo