Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

codewarrior hcs12

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions

Question

What does stickiest refer to in regard to social media

Answered: 1 week ago