Assembly Language Learning 3 assembly write EXE

Source: Internet
Author: User

1. The assembly language source program has two kinds of instructions, a assembly instruction, a pseudo-directive.
2. The assembly instruction has the corresponding machine instruction, finally executes for the CPU
3. The pseudo-directive does not have a corresponding machine instruction, which is executed by the compiler.
4.assume,segment,ends,end all pseudo-directives


First step: Write the Assembly source code

New text 1.txt

The code is as follows:

Assume CS:CODESG; Associate CS Register and CODESG code snippet

CODESG segment; CODESG Code snippet Start

MOV ax,0123h
MOV bx,0456h
Add AX,BX
Add Ax,ax

MOV ax,4c00h
int, mov ax,4c00 int 21 These 2 instructions implement program return

CODESG ends; CODESG Code snippet end Segment,ends paired use

End; complete assembler.


Step two: Compile the connection to the source code

Download the MASM5 compilation tool and put it in the C packing directory

Step three: Get the final exe

Assembly Language Learning 3 assembly write EXE

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.