forked from primyt/Assembly-language-x86-8086
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathline.asm
17 lines (14 loc) · 983 Bytes
/
line.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
;author : Mrinal Pandey
.model small ; assembler directive to allocate memory
.data ; data segment
str db "Hello World", 10, 13, "$" ; variable str to store message to be printed
; (10[\n] to change line, 13[\r] for carriage return)
.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