section .data ;Data section to declare constants , messages
m1 db 10,"Hello world!" ;messge declaration with define byte(dp) 10 for new line
m2 db 10,"I am Abhishek Masali"
l1 equ $- m1 ;length of the message(l1)
l2 equ $- m2
section .text ;main program section (code segment we can from outside)
global _start
_start:
;-----------------------------Print message code ----------------------
mov rax,1 ;system call for write (rax = 64 bit registrer)
mov rdi,1 ;file handle 1 is stdout
mov rsi,m1 ;address of string to output
mov rdx,l1 ;number of bytes
syscall ;invoke operating system to do the write
mov rax,1
mov rdi,1
mov rsi,m2
mov rdx,l2
; syscall
;-----------------------------Exit code ----------------------------
mov rax, 60 ;system call fro exit
mov rdi, 0 ;exit code 0
syscall ;invokie operating systemto exit
To embed this program on your website, copy the following code and paste it into your website's HTML: