Question

Convert the following C code to AVR assembly (you might want to reference the AVR Instruction Set Data Sheet in Lab Resources on Moodle) If (i < 100X Assume we are working with unsigned integers and that i is in register R28, x in R22 and j in R23 O COMPARE: CP R28 100 BRCS END MOV R22 R23 INC R23 INC R28 JMP COMPARE END NOP O COMPARE: CPI R28 100 BRCC END MOV R22 R23 INC R23 INC R28 JMP COMPARE NOP END O COMPARE: CPI R28 100 BRMI END MOV R22 R23 INC R23 INC R28 JMP COMPARE END NOP O COMPARE: CPI R28 100 BRPL END MOV R22 R23 INC R23 INC R28 JMP COMPARE NOP END

0 0
Add a comment Improve this question Transcribed image text
Answer #1

is +. else Mov R22 R23 INC R23 INC R28 JMP Compare ENDNoP Option

Add a comment
Know the answer?
Add Answer to:
Convert the following C code to AVR assembly (you might want to reference the AVR Instruction...
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
ADVERTISEMENT