Question: Write a short program segment that doubles the longword-sized content in register D4 if the content in register D4 is positive. After the program segment,

 Write a short program segment that doubles the longword-sized content in

Write a short program segment that doubles the longword-sized content in register D4 if the content in register D4 is positive. After the program segment, please also copy the content of register D4 to memory location with address 0x3000. You can use the IF THEN structure discussed in Lecture 6. (6 points) Hint: for conditional branch, BPL or BMI may not work in this problem, since "PL" means "non-negative" (N=0) while MI" means "negative" (N-1). So you can use a comparison instruction first and then use a conditional branch discussed in Lecture 6. To double content in register D4, you can make a copy of register D4 in another data register, and add the content of that register to register D4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!