Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. (25 points) Design and write an MSP430 assembly language subroutine that returns the maximum absolute value of a signed integer array, ie, MAXAasamaximumla(i)I), i-o,

image text in transcribed
4. (25 points) Design and write an MSP430 assembly language subroutine that returns the maximum absolute value of a signed integer array, ie, MAXAasamaximumla(i)I), i-o, n-1, nX). The main program that calls the subroutine is shown below. What does the main program do with the returned value? How do we pass the input parameters? #-STACK-END, SP DTPH MDTHOLD,&NDTCTLStop watchdog Initialize stackpointer RESET mov.w StopHoT mov eain: tiner bis-b #exFF,8P2DIR push #arri mov.w #aend, R5 sub.w #arr1,RS rra.w RS push RS call #maxabs configure P1.x as output ;configure P2.x as output ; push the address of arri ; the next address ; (#aend #arr1)/2 is the number of elements ; push the number of elements on the stack add .w #4, SP mov.b R12, P1OUT supb R12 mov.b R12, P2OUT arri: .int 1, 2, 3, 4, -5, -9, -12, 11 signed array aend: maxabs:write your code here

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_2

Step: 3

blur-text-image_3

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Why We Listen?

Answered: 1 week ago