Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. (25 points) Design and write an MSP430 assembly language value of a signed integer array, i.., MAXABS.maximumlarn, it,--1, n>0. The main program th the

image text in transcribed
4. (25 points) Design and write an MSP430 assembly language value of a signed integer array, i.., MAXABS.maximumlarn, it,--1, n>0. The main program th the subroutine is shown below. What does the main program do input parameters? subroutine that returns the maximum absolute with the returned value? How do we pass the mov.u STACK_END, sP : Initialize stackpointer RESET StopDT movMDTPW NDTHOLD,SKDTCTL Stop watchdog timer main: bis.b bis.b push #ex FF ,&P101R #ex FF,&P2DIR #arri configure P1.x as output : configure P2.x as output ; push the address of arri ; the next address ; (#aend #arr!)/2 is the number of elements sub.w #arri, R5 rra.w RS push RS call #maxabs add "w #4,SP mov.b R12, P1OUT swpb R12 mov.b R12, P2OUT jmp ; push the number of elenents on the stack arrl: .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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions