Question: microcontroller MC9S12C32 The array sample contains 7 8-bit signed numbers as shown below. Write a program which computes the sum of negative numbers, the sum

 microcontroller MC9S12C32 The array sample contains 7 8-bit signed numbers as

microcontroller MC9S12C32

The array sample contains 7 8-bit signed numbers as shown below. Write a program which computes the sum of negative numbers, the sum of positive numbers, and the sum of the absolute values of all the numbers, and stores them in psum, nsum, and tsum, respectively. Note that each sum is represented in a word (16 bits). You must use a loop which is iterated 7 times. Outside the loop, there should be only the initialization. Your program should work for any 7 numbers stored in samples. RAMStart-$0800 and ROMStart-$4000. Add a comment on cach instruction samples DC.B $27,$95,$75,SE2,SCB,$41,$44 nsum DC.W 0 psum tsumDC. 0 DC.W 0

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!