title: How to detect a space in a string in ARM assembly
body: <p>I'm trying to detect for a palindrome, and got stuck with the space. I was trying to detect for a space and if found increment to the next byte. but still not working, this is my code. </p>
  
  <pre><code>    loop:  ldrb    r5, [r1]
      ldrb    r6, [r3]
      cmp     r5,  #' '
      beq    skip
      cmp     r6, #' '
      beq     skip2
  
      cmp     r5, r6 
      bne     bad
      add     r1, r1, #1
      sub     r3, r3, #1
      cmp     r1, r3
      bne     loop
  
      skip:   add     r1, r1, #1
              b     loop
  
      skip2:  add     r3, r3, #1
              b     loop 
  </code></pre>