Question: Write an ARM assembly language routine to count the number of 1s in a 32bit word in r0 and return the result in r1. The
Write an ARM assembly language routine to count the number of 1s in a 32bit word in r0 and return the result in r1.

The following image is a screendump after executing the above code. Register r3 contains 0x13 which is 19, the number of 1s in 0x11AB003F.

If this was a subroutine Count, the code might be: Onescount MOVS r0,r0, ROR \#1 Stack DCD 0,0,0,0,0 Stack1 DCD 0,0,0,0,0 WU CAUsersiAlanCorenDesktopiforBrusselsMay2012iChap3Problems.uvproj - Vision4 File Edit View Project Flash Debug Peripherals Iools SvCS Window Help Simulation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
