Windows assembly language development Environment building

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.