bne - conditional branch if the branch is not equal, basically the branch if the zero flag is clear. If it does not branch, it continues to run. Once you find the null termination, you do not go into a loop; instead, you execute the bytes that make up βHellβ as an instruction. Try the following:
.global _start _start: adr r1, hello b test loop: ldr r12, =0x16000000 str r0, [r12] test: ldrb r0, [r1],
give the hand something to do after bne, something else besides the data. it should go through the data line once, and then fall into an infinite loop.
source share