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