Question
Can someone please help me with this problem? We are using CodeWarrior to write this program in assembly language.
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 numbens to be stored in the variable psum and stores the number of the positive numbers in the variable pnumber. Note that a zero is ther positive nor negative. Your program must use a single loop. Your program should work for any 8 numbers stored in samples. RAMStart S0800 and ROMStart $4000. samples DC.B S90,S55 $A0,$00, $20.SCC, $88,S77 nelements DS.B 8 DSB psum pnumber DS.B 1 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.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

; export symbols XDEF Start XREF SEG END SSTACK;symbol defined elsewhere MyRAM: SECTION Sum: ; section for data in RAM ; putXDEF Start ABSENTRY Start required for absolute assembly : export symbols ORG $0900 DS. B 1 ; section for data in RAM : put tORG $0900 DS. B 1 ; section for data in RAM ; put the sum value here 0900 ?? Sum: ORG $4000 ; section for code, constants 400ntern ORG $0900 DS.B 1 ; section for data in RAM : put the sum value here 0900 ? Sum: ORG $4000 ; section for code, constants

Add a comment
Know the answer?
Add Answer to:
Can someone please help me with this problem? We are using CodeWarrior to write this program...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • can someone please help me with this. I need to use java. Recursion Write and run...

    can someone please help me with this. I need to use java. Recursion Write and run a program that reads in a set of numbers and stores them in a sequential array. It then calls a recursive function to sort the elements of the array in ascending order. When the sorting is done, the main function prints out the elements of the newly sorted array Hint: How do you sort an array recursively? Place the smallest element of the array...

  • guys can you please help me to to write a pseudo code for this program and...

    guys can you please help me to to write a pseudo code for this program and write the code of the program in visual studio in.cpp. compile the program and run and take screenshot of the output and upload it. please help is really appreciated. UTF-8"CPP Instruction SU2019 LA X 119SU-COSC-1436- C Get Homework Help With Che X Facebook -1.amazonaws.com/blackboard.learn.xythos.prod/584b1d8497c84/98796290? response-content-dis 100% School of Engineering and Technology COSC1436-LAB1 Note: in the instruction of the lab change "yourLastName" to your last...

  • In C++ syntax please Write a program that implements and demonstrates a linked list using functions....

    In C++ syntax please Write a program that implements and demonstrates a linked list using functions. Your program should first dehne a node that stores an integer and then your program will include the following functions appendo- This function accepts the head pointer (by reference) of a linked list and an integer as it's only arguments. It then creates a node, stores the integer argument in the node, and adds it to the end of the list. findo-This function accepts...

  • can someone solve this program using c++ (visual studio)? You have a grid of 4x4 cells...

    can someone solve this program using c++ (visual studio)? You have a grid of 4x4 cells which is filled by numbers from 1 to 8. Each number appears twice in the grid. The purpose of the Memory Game is to find the matching numbers. To start the game, Player 1 chooses two cells to uncover the numbers behind them. If the numbers match, player 1 gets to go on and uncover two more numbers. If the numbers don't match, player...

  • hello there, i have to implement this on java processing. can someone please help me regarding...

    hello there, i have to implement this on java processing. can someone please help me regarding that? thanks War is the name of a popular children’s card game. There are many variants. After playing War with a friend for over an hour, they argue that this game must never end . However! You are convinced that it will end. As a budding computer scientist, you decide to build a simulator to find out for sure! You will implement the logic...

  • In Java, Using arrays. You are going to write a program that will play a solitaire...

    In Java, Using arrays. You are going to write a program that will play a solitaire (one-player) game of Mancala (Links to an external site.) (Links to an external site.). The game of mancala consists of stones that are moved through various buckets towards a goal. In this version of mancala, the user will be able to choose a number of buckets and a number of stones with which to set up the game. The buckets will be created by...

  • The purpose of this assignment is to develop solutions that perform File IO and objects. Problem specifications are shown below with my changes in blue. 1. File Previewer Write a program that asks...

    The purpose of this assignment is to develop solutions that perform File IO and objects. Problem specifications are shown below with my changes in blue. 1. File Previewer Write a program that asks the user for the name of a text file. The program should display the first 10 lines of the file on the screen. If the file has fewer than 10 lines, the entire file should be displayed along with a message indicating the entire file has been...

  • == Programming Assignment == For this assignment you will write a program that controls a set...

    == Programming Assignment == For this assignment you will write a program that controls a set of rovers and sends them commands to navigate on the Martian surface where they take samples. Each rover performs several missions and each mission follows the same sequence: deploy, perform one or more moves and scans, then return to base and report the results. While on a mission each rover needs to remember the scan results, in the same order as they were taken,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT