大家都知道汇编程序(MASM)的上机过程,先要对源代码进行汇编、连接,然后执行,而这中间有很多环节需要输入很多东西,麻烦的很
如何使这个过程变的简单呢
在我搞汇编课程设计时,我“被逼”写了这个脚本,用起来很爽: @echo off ::close echo cls ::clean screen echo This programme is to make the MASM programme automate ::display info echo Edit by CODERED ::display info echo Mailto me : qqkiller***@sina
com ::display info if "%1"=="" goto usage ::if input without paramater goto usage if "%1"=="/
" goto usage ::if paramater is "/
" goto usage if "%1"=="help" goto usage ::if paramater is "help" goto usage pause ::pause to see usage masm %1
asm ::assemble the
asm code if errorlevel 1 pause & edit %1
asm ::if error pause to see error msg and edit the code link %1
obj & %1 ::else link the
obj file and execute the
exe file :usage ::set usage echo Usage: This BAT file name [asm file name] echo Default BAT