Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Testing contents of a memory cell for 0

Excuse me for asking such a simple question, but assumed you want to test a memory location, say, a 16 bit word in memory address "location"

for 0, what would be the appropriate instructions? easiest, most elegant, shortest, fastest?

    ldr r4,=location

    ldr r0,[r4]

    cmp r0,#0

    bne  1f

    do sth....

1: continue

Parents Reply Children
No data