fdb713吧 关注:17贴子:1,426
  • 0回复贴,共1

【限定testesache】masm的一键编译辅助小程序——masma源代码

只看楼主收藏回复

#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
     string masm, link, filename;
     if(argc == 1)
     {
         cout << "This is an Auxiliary program for Masm, which is aiming to help you build an asm project in no time." << endl
              << "Please type the source file: ";
         cin   >> filename;
     }
     else
         filename = argv[1];
     for(unsigned int i = 0; i < 4; i++)
         filename.erase(filename.size()-1);
     masm = "masm.exe " + filename + ".asm";
     link = "link.exe " + filename + ".obj";
     cout << "Building&Linking......";
     system("@echo off");
     system(masm.c_str());
     system(link.c_str());
     system("@echo on");
     return 0;
}



1楼2010-11-25 21:45回复