Question

80% 10:20 AM *スス0 5_607098276.. 1. Study the following instructions sequence. Determine the final content is WREG and 0x012 m

please do question 1

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

It is asked to do question 1. So, i'm doing question 1 only if you have problem or want me do do other 4 question also, ask in comment i will provide answer of other 4 also.

Q) Study the following instructions sequence. Determine the final content is WREG and 0x12.

movlw 0
movwf 0x12,A
movlw 0x22
addwf 0x12,W,A
addwf 0x12,W,A
addwf 0x12,W,A
addwf 0x12,W,A

Sol) movlw 0 - here 0 is loaded in WREG to clear it. WREG = 0

movwf 0x12,A - here, the WREG is moved to location 0x12 to clear this location. Now, [0x12] = 0

movlw 0x22 - value 0x22 is moved to WREG. WREG = 0x22

addwf 0x12,W,A - Value at location 0x12 is added with value of WREG and result that is sum is stored in WREG. WREG = [0x12] + 0x22 = 0 + 0x22 = 0x22. Here, WREG = 0x22, [0x12] = 0

addwf 0x12,W,A - Value at location 0x12 is added with value of WREG and result that is sum is stored in WREG. WREG = [0x12] + 0x22 = 0 + 0x22 = 0x22. Here, WREG = 0x22, [0x12] = 0

addwf 0x12,W,A - Value at location 0x12 is added with value of WREG and result that is sum is stored in WREG. WREG = [0x12] + 0x22 = 0 + 0x22 = 0x22. Here, WREG = 0x22, [0x12] = 0

addwf 0x12,W,A - Value at location 0x12 is added with value of WREG and result that is sum is stored in WREG. WREG = [0x12] + 0x22 = 0 + 0x22 = 0x22. Here, WREG = 0x22, [0x12] = 0

So, finally we get content of WREG = 0x22 and [0x12] = 0.

I have tried to explain the solution as simple and briefly as possible if you find any problem regarding explanation or answer ask in comment.   

Add a comment
Know the answer?
Add Answer to:
please do question 1 80% 10:20 AM *スス0 5_607098276.. 1. Study the following instructions sequence. Determine...
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