SHARE
TWEET

Untitled

a guest Oct 15th, 2019 132 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .text
  2.     .global main
  3.  
  4. main:
  5.     push {lr}
  6.  
  7.     sub sp, #8
  8.  
  9.     ldr r0, scanf_fmt_ptr
  10.     mov r1, sp
  11.     mov r2, sp
  12.     sub r2, #4
  13.     bl scanf
  14.  
  15.     ldr r3, [sp]
  16.     ldr r4, [sp, #-4]
  17.     add sp, #8
  18.  
  19.     ldr r0, printf_fmt_ptr
  20.     add r1, r3, r4
  21.  
  22.     bl printf
  23.  
  24.     pop {lr}
  25.  
  26.     bx lr
  27.  
  28. printf_fmt_ptr:
  29.     .word printf_fmt
  30. printf_fmt:
  31.     .string "%d\n"
  32.  
  33. scanf_fmt_ptr:
  34.     .word scanf_fmt
  35. scanf_fmt:
  36.     .string "%d%d"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top