Advertisement
dbarrera

Untitled

Sep 30th, 2022
846
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. global _start
  2. .align 4
  3.  
  4.  
  5. .data
  6.     msg .ascii "hello, world!\n"
  7.     len . - msg
  8.  
  9. ; stdin  0
  10. ; stdout 1
  11. ; stderr 2
  12.  
  13. .text
  14. _start:
  15.     mov x0, #1      ; stdout
  16.     ldr x1, =msg
  17.     ldr x2, =len
  18.     mov w8, #64     ; syscall 64 (write)
  19.     svc #0
  20.  
  21.     mov x0, #0      : status 0 (OK)
  22.     mov w8, #93     syscall 93 (exit)
  23.     svc #0
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement