Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

especially , 3rd and 4th question please 1. 25 pts] Write an MSP430 C function that implements bubble sort of N words: bubbleSort(short int *inpPtr,

especiallyimage text in transcribed,

3rd and 4th question please

1. 25 pts] Write an MSP430 C function that implements bubble sort of N words: bubbleSort(short int *inpPtr, short int *outPtr, short int N) 2. [25 pts] 2.1 [20 pts] Write an MSP430 assembly subroutine bubbleSort that implements the same using R12 and R13 as registers for source and destination addresses and R4 as the number of words to be sorted. 2.2 [5 pts] Modify bubbleSort to create a subroutine median that implements the median of N words (for simplicity, assume N is odd), R14 should contain the output value. 3. [25 pts] 3.1 [20 pts] Write an MSP430 assembly subroutine addLong that adds two 32-bit signed numbers with [R13:R12] and [R15:R14] holding the arguments with Little Endian convention, that is, R12 and R14 holding lower words (use the same convention for the remainder of this exam), output should be stored in [R15:R13] 3.2 [5 pts] Modify addLong into another subroutine subLong that subtracts two 32-bit signed numbers 4. [25 pts] Write an MSP430 assembly routine mpyW that multiplies two 16-bit signed words with R12 and R13 holding input values and output should be stored in [R15:R14] 1. 25 pts] Write an MSP430 C function that implements bubble sort of N words: bubbleSort(short int *inpPtr, short int *outPtr, short int N) 2. [25 pts] 2.1 [20 pts] Write an MSP430 assembly subroutine bubbleSort that implements the same using R12 and R13 as registers for source and destination addresses and R4 as the number of words to be sorted. 2.2 [5 pts] Modify bubbleSort to create a subroutine median that implements the median of N words (for simplicity, assume N is odd), R14 should contain the output value. 3. [25 pts] 3.1 [20 pts] Write an MSP430 assembly subroutine addLong that adds two 32-bit signed numbers with [R13:R12] and [R15:R14] holding the arguments with Little Endian convention, that is, R12 and R14 holding lower words (use the same convention for the remainder of this exam), output should be stored in [R15:R13] 3.2 [5 pts] Modify addLong into another subroutine subLong that subtracts two 32-bit signed numbers 4. [25 pts] Write an MSP430 assembly routine mpyW that multiplies two 16-bit signed words with R12 and R13 holding input values and output should be stored in [R15:R14]

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

Step: 3

blur-text-image

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

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

5.5 Summarize external recruitment methods.

Answered: 1 week ago