articles » current » assembly » x86 » hello-msdos

x86 Assembly: Hello World Example (MSDOS)

Example MSDOS program.
TITLE Hello World

.model small
.stack 100h

message BYTE "Hello World",0dh,0ah,0

main PROC
	mov ax,@data
	mov ds,ax

	mov ah,40h            ; write to device
	mov bx,1              ; output handle
	mov cx,SIZEOF message ; size in bytes of message
	mov dx,OFFSET message ; address of buffer
	int 21h

main ENDP
END main
x86 Assembly Hello World

This site uses cookies. Cookies are simple text files stored on the user's computer. They are used for adding features and security to this site. Read the privacy policy.