Skip to content
  • Home
  • Blogs
  • QNA
    • Community
    • Ask
    • Questions
  • Explore
    • Tools
    • Computer Science
    • Electrical
    • Electronics
    • Digital Marketing
    • Technology
    • Hiring Process
    • Interview Questions
    • Roadmap
    • Comparison
    • What Is
    • Project
    • Top Things
    • TechNews
  • News?
  • Login
newlogo of cs Electrical And Elect
  • Home
  • Blogs
  • QNA
    • Community
    • Ask
    • Questions
  • Explore
    • Tools
    • Computer Science
    • Electrical
    • Electronics
    • Digital Marketing
    • Technology
    • Hiring Process
    • Interview Questions
    • Roadmap
    • Comparison
    • What Is
    • Project
    • Top Things
    • TechNews
  • News?
  • Login

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

Proudly powered by WordPress | RealEstate Pack Lite by Wp Theme Space.

WhatsApp us