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