Question: Can someone please help me with this problem? We are using CodeWarrior to write this program in assembly language, thank you! The array sample contains
Can someone please help me with this problem? We are using CodeWarrior to write this program in assembly language, thank you!
The array sample contains eight 8-bit signed binary numbers (integers) as shown below. Write a program which stores the positive numbers in the array pelements, computes the sum of the negative numbers to be stored in the variable nsum and stores the number of the positive numbers in the variable pnumber. Note that a zero is neither positive nor negative. Your program must use a single loop. Your program should work for any 8 numbers stored in samples RAMStart-$0800 and ROMStart-$4000 samples DC.B pelements DS.B S90,S55.SA0,$00, $20,SCC,$88,$77 nsum DS.B pnumber DS.B 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 (the source, memory and register windows) right before the first instruction is executed, right after the 4th number is processed, and right after the last instruction except rts is executed. 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
