"Hello World"--The first assembler program

Source: Internet
Author: User

Hello World This is the first simplest program of every programming language, and the following program is the Hello World of assembly language. To learn to compile for a period of time, until now to record their first compilation program notes. Although this is a fairly simple small program, but this is a beginning, with the beginning, the future of their own notes may be updated more frequently.

Assembly (x86)
12345678910111213141516171819 stack segment stack ' stack ' DW -dup(0) stack ends Data segment Hello db"hello,world!$" ; define string constants Hello data ends Code segment assume ds:data,CS:code start: push ds mov ax,0 push ax mov ax,data mov ds,ax Lea DX,hello ; Take the offset address of the string constant hello, into the dx mov ah,9 ; number 9th function call: Displays the value of the string constant Hello on the screenint 21h RETFcode ends End start

The first program on assembly is here, that's it. Next I will remember more notes, to facilitate their own while also convenient for others.

Source: http://www.shelwee.com/html/archives/65498.html

"Hello World"--The first assembler program

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.