Home | x86 Assembly | <<< Previous | Next >>> |
As made popular by C and C++, the first program written for a language usually displays 'Hello World'.
Several popular ways to write Hello World in assembly are known. Two listings are given below:
PROGRAM 1title Hello World .dosseg .data .code
mov ah,9
mov ax,4C00h |
PROGRAM 2
.model
tiny |
To run these two programs, do the following:
Run the file program1.exe, and your message will be displayed.
In the same way, you can also compile the second program.
The difference between the two programs is that in the first case, you get an .EXE file, which is over 500 bytes large. In the second case, you'd get a .COM file which is 21 bytes in size.
Click to download Program1, and Program2
Home | x86 Assembly | <<< Previous | Next >>> |