SHARE
TWEET

Untitled

a guest Oct 15th, 2019 115 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.     loop:
  8.         ldr r0, stdin_label
  9.         ldr r0, [r0]
  10.         bl fgetc
  11.  
  12.         cmp r0, #-1
  13.         popeq {lr}
  14.         bxeq lr
  15.  
  16.         cmp r0, #48
  17.         blt loop
  18.  
  19.         cmp r0, #57
  20.         ldrle r1, stdout_label
  21.         ldrle r1, [r1]
  22.         blle fputc
  23.  
  24.         b loop
  25.  
  26. stdin_label:
  27.     .word stdin
  28.  
  29. stdout_label:
  30.     .word stdout
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