Build assembly language development environment windows10

1 preparation tools

    1) Download DOSBOX

     Tools Description: DOSBox is a DOS emulator, because it uses the SDL library, it can be easily ported to other platforms. At present, DOSBox has support for running Windows, Linux, Mac OS X, BeOS, palmOS, Android, webOS, os / 2 and other systems. DOS under a lot of games can be run directly on the platform.

     Tool's official website: http: //www.dosbox.com/

     Project home page: http: //sourceforge.net/projects/dosbox/

     Download link: http: //sourceforge.net/projects/dosbox/files/dosbox/0.74/DOSBox0.74-win32-installer.exe/download (32-bit)

     2) Download MASM32

     Tools Description: MASM32 is foreign MASM enthusiasts Steve Hutchesson self-organize and write a software package, the highest version is 11r version. MASM32 does not refer to Microsoft's MASM macro assembler, but includes a different version of the tool assembly to form development kit. Its assembler is MASM6.0 above version Ml.exe, resource compiler is Microsoft Visual Studio in Rc.exe, 32-bit linker is Microsoft Visual Studio in Link.exe, while the other contains some DumpPe.exe as Lib.exe and other tools.

     Tool's official website: http: //www.masm32.com/

     Download link: http: //www.masm32.com/downloads

 3) Compilation Tools Download: Link: https://pan.baidu.com/s/1bxjE89WmeSQ5iXhy34e9sQ Password: v6a4

 

2 installation tool

     1) Installation DOSBOX

      Install downloaded to DOSBox0.74-win32-installer.exe.

  2) DOSBox Guide:

  1. Create a saved compilation tools (such as MASM, Link, DEBUG and other tools) and assembly files (* .asm) directory, such as: D: \ DEBUG.

  2. Select the compilation tools above link to download compilation tools. The extracting archive file is downloaded to your own just just the new working directory.

             We actually will use the following procedure: debug.exe edit.com link.exe masm.exe.

  3. After you download and install DOSBox open the program

    

  4, enter the following command (command-line case insensitive) above are sequentially selected interface:

    The first step: MOUNT CD: \ DEBUG (Enter) (the directory D: \ DEBUG mounted as C under DOSBOX :); note here E: \ DOS is the working directory you created earlier, according to their own directory input

    Step two: C: (Enter) (the D: \ DEBUG write your PATH environment variable)

    Results of the first two steps as shown below

    

    In this way we enter the DOS environment, where you can write the assembler.

    

    In order to avoid every time into the command interface have entered above, we can make the following simple configuration, so that later you can go directly to the directory we want to use:

 

     Open DOSBOX installation root directory,

    Double-click the file DOSBox 0.74 Options.bat, after you run the batch file will open the configuration file with a text document dosbox-0.74.conf Notepad.

    Position the cursor [AutoExec] dosbox-0.74.conf file node (typically at the end of the file), add the following documents:

      

MOUNT CD: \ DEBUG # directory D: \ DEBUG mounted as DOSBOX under C: 
C:  

    The last run DOSBox once again we can see directly into the interface shown below

    

     3) Installation MASM32

     可解压安装下载到的masm32v11r.zip,按默认配置安装即可。

     安装结束后,可直接利用masm32v11r中的gedit.exe程序编写、编译和链接asm汇编程序。

     注意:MASM32的替代方案:

     可直接从其他电脑或从上述网盘地址提供的压缩包将汇编工具DEBUG.EXE、EDIT.EXE、LINK.EXE、MASM.EXE等工具复制到D:\DEBUG文件夹下(复制时注意不能将32位系统中找到的上述工具复制到64位系统中使用)。

 

     3 程序调试过程

      注意:当进入DOSBOX编辑界面,随意可以按Windows键退出DOSBOX编辑界面;以下命令的拼写忽略大小写。

     1)运行DOSBOX,在命令符C:\>下输入命令:EDIT 文件名.asm,启动EDIT.EXE进入代码编辑状态,输入程序代码:

     2)保存文件后返回DOSBOX的命令行,输入命令:MASM 文件名.asm,生成目标文件文件名.OBJ(生成过程中可以修改目标文件名,直接回车可保持默认目标文件名)。

     3)输入命令:LINK 文件名.OBJ,链接生成可执行文件文件名.EXE。

     4)输入命令:DEBUG 文件名.EXE,在DEBUG的命令提示符“-”出现后开始调试。

 

转载来源:https://www.cnblogs.com/zyever/p/7919007.html

Guess you like

Origin www.cnblogs.com/HellooJmr/p/12101970.html