Advertisement
Guest User

Untitled

a guest
Nov 10th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 0.46 KB | None | 0 0
  1. #include <asm/unistd_32.h>
  2.  
  3.     .intel_syntax noprefix
  4.     .text
  5.     .global _start
  6.    
  7. _start:
  8.     sub esp, 1
  9. Loop:
  10.     mov edi, esp
  11.     mov eax, __NR_read
  12.     mov ebx, 0
  13.     mov ecx, edi
  14.     mov edx, 1
  15.     int 0x80
  16.     cmp eax, -1
  17.     je Finish
  18.    
  19.     mov eax, __NR_write
  20.     mov ebx, 1
  21.     mov ecx, edi
  22.     mov edx, 1
  23.     int 0x80
  24.     jmp Loop
  25.    
  26. Finish:
  27.        
  28.     mov eax, __NR_exit
  29.     mov ebx, 1
  30.     int 0x80
  31.    
  32.     .data
  33. hello_world:
  34.     .string "Hello, World!\n"
  35. hello_world_ptr:
  36.     .long hello_world
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement