Advertisement
Guest User

Untitled

a guest
Nov 29th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 0.25 KB | None | 0 0
  1. @ r0: endereco do comeco do vetor de structs
  2. @ r1: valor
  3. find_element:
  4.    
  5.     for:
  6.         cmp r0, #0
  7.         beq fim_for
  8.         ldrh r2, [r0, #4]
  9.         if:
  10.             cmp r2, r1
  11.             bne fim_for
  12.             mov pc, lr
  13.     fim_for:
  14.         ldr r2, [r0]
  15.         mov r0, r2
  16.         b for
  17.  
  18. mov r0, #0
  19. mov pc, lr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement