Question: 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
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
Get step-by-step solutions from verified subject matter experts
