This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ; Check for one bne shift add r2, r2, #1 ; Increment one's count shift mov r0, r0, lsr #1 ; Shift to check for next bit ; position add r3, r3, #1 ; Increment count to determine the ; number of bits we've checked cmp r3, #32 ; Done? Checked 32 bits already? blt check ; Check next bit if we're not done mov r0, r2 ; Store result (number of one's) ; in return value register mov pc,lr ; Return...
View Full Document
This document was uploaded on 11/03/2011 for the course CSE 380 at SUNY Buffalo.
- Spring '11