Advertisement
Garey

Untitled

Apr 22nd, 2019
2,975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 0.22 KB | None | 0 0
  1. .global getipstr
  2.  
  3. getipstr:
  4.     MOV R12, #10
  5.  
  6. L1:
  7.     MOV R2, #0
  8.  
  9. L2:
  10.     LDRB R3, [R0], #1
  11.     SUBS R3, R3, #'0'
  12.  
  13.     MLAHS R2, R12, R2, R3
  14.     BHS L2
  15.    
  16.     ADD R1, R2, R1, LSL #8
  17.     CMP R3, #-'0'
  18.  
  19.     BNE L1
  20.  
  21.     MOV R0, R1
  22.  
  23.     BX LR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement