hello program
Assembly
section .data
msg1 db "my name is abhijit singh",10 ;10/0ahis for break line
msg1_len equ $-msg1
msg2 db "i am learning macro in this tutorial"
msg2_len equ $-msg2
%macro print 2 ;print is name and 2 is number of arguments
mov rax,1 ;sys call 1 to write
mov rdi,1 ;sys call for stdout
mov rsi, %1 ;% is same like & in c++,which drepresents adress of 1st arguments
mov rdx ,%2 ;same like above
syscall
%endmacro
section .text
global _start
_start:
print msg1,msg1_len
print msg2,msg2_len
mov rax,60 ;program to exit
mov rdi,0
syscall
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.