大家在寫(xiě)匯編語(yǔ)言的時(shí)候經(jīng)常在用
masm 文件名;
link 文件名;
debug 文件名.exe
用c語(yǔ)言寫(xiě)個(gè)工具,方便一次性編譯鏈接
鍵入的時(shí)候,不要鍵入后綴
例如文件名是 01.asm
masm 01;
link 01;
debug 01.exe
使用我這個(gè)工具,只需輸入masmtools 01即可。
大家吧這個(gè)工具拷貝到masm安裝目錄即可。
工具和源碼這里下載:
/Files/alantop/MASMTools.rar
// MASMTools.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main(int argc, char* argv[])
{
char buf[500] = "\0";
strcpy(buf, "masm ");
strcat(buf, argv[1]);
strcat(buf, ";");
system(buf);
//system("pause");
memset(buf, '\0', 500);
strcpy(buf, "link ");
strcat(buf, argv[1]);
strcat(buf, ";");
system(buf);
//system("pause");
memset(buf, '\0', 500);
strcpy(buf, "debug ");
strcat(buf, argv[1]);
strcat(buf, ".exe");
system(buf);
return 0;
}