1. Download software Mash32
Http://www.masm32.com/download/masm32v11r.zip
This software includes compiling and running the assembly files, running and extracting them directly after downloading.
2. Configure Environment variables
Add the following path in the system environment: E:\masm32\bin
To see if the configuration was successful, you can see if the ML and link commands are OK
$ ml
Microsoft (R) Macro assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
usage:ml [Options] filelist [/link linkoptions]
Run "Ml/help" or "ML/?" For more info
$ link
Link: lack of operands
Try ' link--help ' for more information.
3. First compilation source program
assume CS:CODESGCODESG segment mov ax,0123h mov bx,0456h add ax,bx add ax,ax mov ax,4c00h int 21H codesg endsend
This program copied textbooks, including pseudo-code and assembly code, the assembly code will eventually be executed by the CPU, pseudo-code will not be executed by the CPU.
Compile:
$ ml test.asm
Microsoft (R) Macro assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling:test.asm
Link: extra operand "NUL"
Try ' link--help ' for more information.
Although there is a warning, the ML step has been completed, this step is to Asm->obj
Link:
$ link Test.obj test.exe
Do not report any errors, must be followed by the Test.exe parameters, or will error. The same as obj and EXE file names are recommended
Run:
$ test.exe
The program does not have any output because this code does not output any information to the terminal
Summarize:
Through the MASH basic completion of the development of the environment to build, formally began the assembly language learning journey!!
Windows assembly language development Environment building