Question: ELEC2220 Computer Systems Spring 2020 Homework # 5 (due on 2/28/20 in class) The array sample contains 6 8-bit signed numbers as shown below. Write

ELEC2220 Computer Systems Spring 2020 Homework # 5 (due on 2/28/20 in class) The array sample contains 6 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 squares of all numbers, and stores them in psum, nsum, and sqsum, respectively. Note that each sum is represented in a word (16 bits). You must use a loop which is iterated 6 times. Your program should work for any 6 numbers stored in samples, i.e., no hard-coding. RAMStart=$0800 and ROMStart-$1000. Add a comment on each instruction and assume no overflow. samples nsum psum sqsum DC.B DC.W DC.W DC.W $10,$DO,820, SEO,$B0,$50 0 0 0 Assemble the program and execute it in the single-step mode with the contents of the array and variables displayed in the memory window. Do screen-captures (at least the source, register and memory windows with the contents of all memory variables displayed in the memory window) right before the first instruction is executed, right after the 4th number is processed, and right after all of the final sums are stored into the respective variables. Submit the list file of your code with the 3 sets of screen-captures attached. ELEC2220 Computer Systems Spring 2020 Homework # 5 (due on 2/28/20 in class) The array sample contains 6 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 squares of all numbers, and stores them in psum, nsum, and sqsum, respectively. Note that each sum is represented in a word (16 bits). You must use a loop which is iterated 6 times. Your program should work for any 6 numbers stored in samples, i.e., no hard-coding. RAMStart=$0800 and ROMStart-$1000. Add a comment on each instruction and assume no overflow. samples nsum psum sqsum DC.B DC.W DC.W DC.W $10,$DO,820, SEO,$B0,$50 0 0 0 Assemble the program and execute it in the single-step mode with the contents of the array and variables displayed in the memory window. Do screen-captures (at least the source, register and memory windows with the contents of all memory variables displayed in the memory window) right before the first instruction is executed, right after the 4th number is processed, and right after all of the final sums are stored into the respective variables. Submit the list file of your code with the 3 sets of screen-captures attached
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
