forked from primyt/Assembly-language-x86-8086
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello.asm
16 lines (13 loc) · 764 Bytes
/
hello.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;author : Mrinal Pandey
.model small ; assembler directive to allocate memory
.data ; data segment
str db "Hello World $" ; variable str to store message to be printed
.code ; code segment
mov ax, @data ; initialize ds register
mov ds, ax
lea dx, str ; load effective address of str in dx
mov ah, 09h ; use 09 function of int 21h
int 21h ; call interrupt to print the content present at address in dx
mov ah, 4ch ; function to terminate with return code
int 21h ; call the interrupt
end ; end directive