Question

write a program that finds the number of zeros in an 8-bit data item using assembly...

write a program that finds the number of zeros in an 8-bit data item using assembly language please.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

R1 EQU 0x20

COUNT EQU 0x21

VALREG EQU 0x22

BCF STATUS, C

C = 0

CLRF R1

MOVLW 0x8

MOVWF COUNT

MOVLW 0x97

MOVWF VALREG

AGAIN RLCF VALREG, F

MOV A,0

CMP VALREG, A

BNC NEXT

INCF R1, F

NEXT DECF COUNT, F

BNZ AGAIN

Add a comment
Know the answer?
Add Answer to:
write a program that finds the number of zeros in an 8-bit data item using assembly...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT