Write an ASM program to count number of zeros and ones? All Questions › Category: Embedded System › Write an ASM program to count number of zeros and ones? 0 Vote Up Vote Down Chetan Shidling Staff asked 5 years ago I need code. 1 Answers 1 Vote Up Vote Down Chetan Shidling Staff answered 5 years ago Code: AREA ZEROS_ONES, CODE ENTRY LDR R0,= VAR MOV R1, #32 LDR R2, [R0] Z1MOVS R2, R2, LSL#1 ADDCS R3, R3, #1 ADDCC R4, R4, #1 SUBS R1, R1, #1 BNE Z1 STOP B STOP VAR DCD 0X01010101 END