Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a MSP430 assembly language program to was given and the possible scores on the test were from 0 to 20. There are 15 students
Write a MSP430 assembly language program to was given and the possible scores on the test were from 0 to 20. There are 15 students in the class, and their scores are given here: find information about test scores. A school test Scores: 18. 20. 6, 10, 16, 16, 18. 19, 13, 0, 14, 16, 14, 17, 16 The teacher would like to know the maximum score, the histogram, a and the mode 1. Write a main program that calls two subroutines a number of times. First the main program calls 'max' to find the maximum value in the list of scores. Second, the main program calls histo' repeatedly, and builds the histogram in memory. Third, the main program calls 'max using the histogram addresses to find the mode (value that occurs most). To pass information between the main program registers R12 to R15 for parameter passing. and the subroutines, use registers. A common convention is to use 2. Write a subroutine called 'max' and take as input a starting address (R13) and ending address (R14), and return the maximum number in that range of addresses (R15) 3. Write a subroutine called 'histo', and take as inputs a number to look for (R12), a starting address (R13), and ending address (R14). The 'histo' subroutine should return the number of times the number was found (occurrences) in the range of addresses (R15) Before the main program, a. store the scores in memory. What size and type of data is this? b. reserve space for the histogram. What size and type of data is this? c. reserve space for the maximum score. What size and type of data is this? d. reserve space for the mode. What size and type of data is this? use assembler directives to At the end of your program, the histogram, maximum score, and mode should be in Write a MSP430 assembly language program to was given and the possible scores on the test were from 0 to 20. There are 15 students in the class, and their scores are given here: find information about test scores. A school test Scores: 18. 20. 6, 10, 16, 16, 18. 19, 13, 0, 14, 16, 14, 17, 16 The teacher would like to know the maximum score, the histogram, a and the mode 1. Write a main program that calls two subroutines a number of times. First the main program calls 'max' to find the maximum value in the list of scores. Second, the main program calls histo' repeatedly, and builds the histogram in memory. Third, the main program calls 'max using the histogram addresses to find the mode (value that occurs most). To pass information between the main program registers R12 to R15 for parameter passing. and the subroutines, use registers. A common convention is to use 2. Write a subroutine called 'max' and take as input a starting address (R13) and ending address (R14), and return the maximum number in that range of addresses (R15) 3. Write a subroutine called 'histo', and take as inputs a number to look for (R12), a starting address (R13), and ending address (R14). The 'histo' subroutine should return the number of times the number was found (occurrences) in the range of addresses (R15) Before the main program, a. store the scores in memory. What size and type of data is this? b. reserve space for the histogram. What size and type of data is this? c. reserve space for the maximum score. What size and type of data is this? d. reserve space for the mode. What size and type of data is this? use assembler directives to At the end of your program, the histogram, maximum score, and mode should be in
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started