Hi All,
The adr instruction is based on the assumption that your pc contains 0x8008 at the time that you execute it. The ldr is going to pull in a link time value which is the same no matter where you are.
If for example this code is actually located at address 0x20000000 then when that first instruction (the adr is a pseudo instruction, in the disassembly it is a sub of 8), the adr, is executed now you get a 0x20000008-8 = 0x20000000 and you compare that with 0x8000 they dont match. If you are running the code at 0x8000 then 0x8008-8 = 0x8000 and the two match.
Just read the code and look up the adr instruction (or do what I did and just try it and examine the output of the compiler/tools, and/or run it on hardware if that doesnt show the answer).
PrepaidGiftBalance