ARM Assembly accepting '-'
<p>So my code currently converts a string into a integer. My code is currently working and functional however, i need it to accept an "-" at the beginning of the input to judge if it is a negative or not. I have no idea how to do this and i can not find any sources. I am currently passing in (test3:  .asciz "-48") into register r0. and when i run in the debugger i am receiving 45. here is my code for reference.</p>

<pre><code>    .global stoi
    .text
stoi:
    push {r4,r5,r6,r8,r9,lr}
    @r0 = buffer
    mov r1,#0         @r1 = n = 0
    mov r9,#0         @buffer counter
    mov r4,#48        @0 checker
    mov r5,#57        @9 checker
    b 5f

5:
    ldrb r3,[r0,r9]      @r3 = c

    b 1f

1:
    cmp r3,r4         @cmp c to 0(48 in ASCII)
    bge 2f
    b 4f
2:
    cmp r3,r5       @cmp c to 9(57 in ASCII)
    ble 3f
    b 4f
3:
    sub r6,r3,#'0'      @r6 = (c - '0')
    @strb r6,[r0,r9]
    add r1,r1,r1,lsl#2  @r1 = n * 10
    add r1,r1,r1,lsl#0

    add r1,r1,r6        @n = n * 10 + (c - '0')

    add r9,r9,#1        @add to buffer
    b 5b

4:
    mov r0,r1
    pop {r4,r5,r6,r8,r9,pc}
</code></pre>