%macro disp 4 ;name of macro 4 parameters are used
 mov rax,%1 ;read syscall
 mov rdi,%2 ;keyboard
 mov rsi,%3 ;variable
 mov rdx,%4 ;variable length
 syscall
%endmacro
section .data
  msg db "Enter your name: ",10
  msglen equ $-msg
  newline db 10
section .bss
  name resb 20
  temp resb 10
section .text
global _start
_start:

disp 1,1,msg,msglen
disp 0,0,name,15
disp 1,1,newline,1
disp 1,1,name,15
disp 1,1,newline,1

mov rax,60
mov rdi,0 
syscall

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: