1 Tool Preparation
1) Download DOSBox
Tool Description: DOSBox is a DOS simulation program, because it uses the SDL library, so it can be easily ported to other platforms. Currently, DOSBox is supported in systems such as Windows, Linux, Mac OS X, BeOS, PalmOS, Android, WebOS, OS/2, and more. Many DOS games can be run directly on the platform.
Tools Website: http://www.dosbox.com/
Project home: http://sourceforge.net/projects/dosbox/
Download Link: http://sourceforge.net/projects/dosbox/files/dosbox/0.74/DOSBox0.74-win32-installer.exe/download (32-bit)
Description: As the project has been stopped more, the official online now pointed out that DOSBox can run on 32-bit and 64-bit Windows Vista and Windows 7, according to my own test, can also run DOSBox on 32-bit and 64-bit Windows 10, so there is a need to try.
2) Download MASM32
Description: MASM32 is a software package compiled and compiled by Steve Hutchesson, a foreign MASM enthusiast, and is currently the highest version of 11R. MASM32 does not refer to Microsoft's MASM macro assembler, but rather contains a compilation development kit that is built with different versions of the tools. Its assembler compiler is a Ml.exe in MASM6.0 and above, and the resource compiler is a RC.EXE,32 bit linker in Microsoft Visual Studio that is Microsoft visual The Link.exe in studio includes other tools such as Lib.exe and DumpPe.exe.
Tools Website: http://www.masm32.com/
Download Link: http://www.masm32.com/downloads
3) Assembly tool Download: Https://pan.baidu.com/s/1i4UKp6X
2 Installation Tools
1) Install DOSBox
Install the downloaded Dosbox0.74-win32-installer.exe and complete the installation directly from next.
2) DOSBox User guide:
1. Create a directory for saving assembly tools (such as MASM, Link, DEBUG, etc.) and assembly files (*.asm), such as: D:\DEBUG.
2, select the above assembly Tools link, download the Assembly tool. Unzip the downloaded zip file into the new working directory you just created.
We will actually use the following procedures: Debug.exe edit.com link.exe Masm.exe.
3, download and install DOSBox after opening the program, will appear in the two interface,
We only care about the interface shown,
The other interface doesn't need attention, it can be minimized but not closed.
4. Enter the following command (the command line is not case sensitive) by selecting the interface above:
The first step: Mount C D:\DEBUG (carriage return) (Mount the directory D:\DEBUG as C: DOSBox); note Here E:\DOS is the working directory you created before, according to your own directory input
Step Two: C: (carriage return) (writes D:\DEBUG to the environment variable path)
The results of the first two steps are as follows:
This allows us to enter a DOS environment where we can write assembler programs.
In order to avoid entering the above command every time we enter the interface, we can make the following simple configuration so that we can go directly to the directory we want to use in the future:
Open the installation root directory for DOSBox (the default installation path: C:\Program files\dosbox-0.74; If the 64-bit system, the default installation path: C:\Program Files (x86) \dosbox-0.74),
Double-click File DOSBox 0.74 Options.bat, and after running the batch file, the system will open the configuration file dosbox-0.74.conf with a text document Notepad.
Position the cursor to the [AUTOEXEC] node of the dosbox-0.74.conf file (typically at the end of the file) and add the following to the file:
Mount C D:\DEBUG # mounts the directory D:\DEBUG as C:c under DOSBox:
When you finally run DOSBox again, you can see the interface directly into the display.
3) Install MASM32
You can unzip the downloaded Masm32v11r.zip and install it on the default configuration.
After installation, the ASM assembler can be written, compiled, and linked directly using the Gedit.exe program in MASM32V11R.
Note:The MASM32 alternative:
The assembly tool can be DEBUG.EXE, EDIT, or compressed directly from other computers or from the address provided in the above-mentioned network addresses. EXE, LINK. EXE, MASM. EXE and other tools are copied to the D:\DEBUG folder (note that the above tools found on 32-bit systems cannot be copied to a 64-bit system for use in replication).
3 Program Debugging Process
Note: When entering the DOSBox editing interface, you can press the Windows key to exit the DOSBox editing interface; the spelling of the following command ignores the case.
1) Run DOSBox, enter the command under command c:\>: Edit filename. asm, start EDIT.EXE Enter code edit state, enter program code:
2) After saving the file, return to the command line of DOSBox, enter the command: MASM file name. ASM, generate the target file file name. OBJ (You can modify the target filename during the build process, and the direct carriage will keep the default target file name).
3) Enter the command: LINK file name. OBJ, the link is delivered as an executable file name. Exe.
4) Enter the command: DEBUG file name. EXE, start debugging after the debug command Prompt "-" appears.
4 References
1) DOSBox Baidu Encyclopedia: http://baike.baidu.com/view/716885.htm
2) Build assembly language development environment under WINDOWS10 (using DOSBox and MASM32): http://blog.csdn.net/doniexun/article/details/45438457
WINDOWS10 Building Assembly language development environment (using DOSBox and MASM32)