This is the example code:
_start: LDR r0, =n LDR r0, [r0] LDR r1, =array1 MOV r2, #0 LDR r4, =array2 loop: LDR r3, [r1], #4 CMP r3, #58 BGT a_point CMP r3, #47 BLT a_point SUB r3, r3, #0x30 STR r3, [r4], #4 a_point: subs r0, r0, #1 BGT loop stop: b stop .Data n: .word 6 array1: .word 0x30, 0xFFFFFFF5, 0x37, 0x4b, 0x18, 0x40 array2: .word 0x01, 0x0, 0x0, 0x0, 0x0, 0x0
I'm having trouble understanding how the loop works, what it does and specifically how the branch instruction work on pair with the -lt and -gt suffixes. What is the purpose of this simple program? Thanks in advance for your help.