Question

Question #1 Convert the following assembly program into machine code. LDAA #$A ! STAA $1000 INCA LDAB $1000 DECB ABA Here: Brpleaseanswernumberz

Question #1 Convert the following assembly program into machine code. LDAA #$A ! STAA $1000 INCA LDAB $1000 DECB ABA Here: Bra Here Question # 2 (a) In Question # 1 , determine the values of PC, A, B, N, Z, V, C after each instruction (b) Verify your answers by using Code Warrior
pleaseanswernumberz
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer :- The value of flag bits and registers have been written below. The numbering is the instruction number.

Register and flag values
1. A = 0xA1, N = 0, Z = 0, C = no effect, V = 0, B = no change
2. A = 0xA1, N = 0, Z = 0, C = no effect, V = 0, B = no change
3. A = 0xA2, N = 0, Z = 0, C = no effect, V = 0, B = no change
4. A = 0xA2, N = 0, Z = 0, C = no effect, V = 0, B = value from memory $1000 = $A1.
5. A = 0xA2, N = 0, Z = 0, C = no effect, V = 0, B = $A1 - $01 = $A0.
6. A = 0xA1 + B = $41, N = 0, Z = 0, C = 1, V = 0, B = $A0.
7. A = 0x41, N = 0, Z = 0, C = no effect, V = 0, B = $A0.
8. No flags chaged. Register values are unaffected.

Add a comment
Know the answer?
Add Answer to:
Question #1 Convert the following assembly program into machine code. LDAA #$A ! STAA $1000 INCA LDAB $1000 DECB ABA He...
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