Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone explain to me how to do this is assembly? The array sample contains eight 8-bit signed binary numbers (integers) as shown below. Write

image text in transcribed
Can someone explain to me how to do this is assembly?
The array sample contains eight 8-bit signed binary numbers (integers) as shown below. Write a program which stores the negative numbers in the array nelements, computes the sum of the positive numbers to be stored in the variable psum 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 nelements $90, $55, $A0, $00, $20, $CC, $88, $77 DS.B 8 psum DS.B 1 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 us 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

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

Step: 3

blur-text-image

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

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions