section .data msg db "Hello, World!",10 msg_len equ $-msg %macro display 4 mov rax,%1 mov rdi,%2 mov rsi,%3 mov rdx,%4 syscall %endm section .text global _start _start: display 1,1,msg,msg_len ;Exit System Call mov rax,60 mov rbx,00 syscall
codeaft@codeaft:~$ nasm -felf64 codeaft.asmcodeaft@codeaft:~$ ld codeaft.o && ./a.out Hello, World! codeaft@codeaft:~$