Advertisement
k1w1z0r

hello_world

Jun 19th, 2024
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .data
  2.     hello db 'Hello, World!', 0
  3.  
  4. section .text
  5.     global _start
  6.  
  7. _start:
  8.     ; Prints "Hello, World!" to the console
  9.     mov rax, 1          ; syscall number for sys_write
  10.     mov rdi, 1          ; file descriptor 1 is stdout
  11.     mov rsi, hello      ; address of hello
  12.     mov rdx, 13         ; number of bytes
  13.     syscall             ; invoke syscall
  14.  
  15.     mov rax, 60         ; syscall number for sys_exit
  16.     xor rdi, rdi        ; exit code 0
  17.     syscall             ; invoke syscall
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement