Question

AND (c- d) then d 6. In ARM assembly program ca ale ule absklute valize of sonx variable a. (fp) ilint The pseudo code is if a thou a-0-a.


0 0
Add a comment Improve this question Transcribed image text
Answer #1
Ans .1.
#Lets find absolute value of r1
        ori $2, $zero, $1      #make a copy of r1 and store in r2
        slt $3, $1, $zero      #checks if r1 is negative
        beq $3, $zero, next    #if r1 is positive, skip next inst
        sub $2, $zero, $1      #r2 = 0 - r1
next:
#r2 has the absolute value of r1
Add a comment
Know the answer?
Add Answer to:
In ARM assembly program calculate the absolute value of son x variable a.
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