This has to be in MSP430 assembly language. Thank you!
Here is a link with instructions set for msp430 (pages 5-8): https://www.ti.com/sc/docs/products/micro/msp430/userguid/as_5.pdf

Write an MSP430 assembly language subroutine, REP_FREE, to examine the elements of a list of positive word-size numbers stored at location LIST_IN. The list is already sorted in ascending order. The first element is the number, n, which is the length of the array. The subroutine will copy the elements from location LIST IN to location LIST_OUT. While ignored. if an occurs more than once then the copies and In essence, the subroutine eliminates the replicated elements from LIST IN places the results in LIST_OUT. Note that you need to update number m (the first element on the top which is the actual number of elements in LIST_OUT after eliminating all replicates.
Program : Find a sum of two integer arrays;
* Input : The input arrays are signed 16-bit integers in arr1 and
arr2
* Output : Display sum of arr1 on P1OUT&P2OUT and sum of arr2
on P3OUT&P4OUT
* Modified by: A. Milenkovic, milenkovic@computer.org
* Date : September 14, 2008
* Description: MSP430 IAR EW; Demonstation of the MSP430
assembler
*------------------------------------------------------------------------------*/
#include "msp430.h" ; #define controlled include file
NAME
main
; module name
PUBLIC
main
; make the main label vissible
; outside this module
ORG 0FFFEh
DC16
init
; set reset vector to 'init' label
RSEG
CSTACK ;
pre-declaration of segment
RSEG
CODE
; place program in 'CODE' segment
init: MOV
#SFE(CSTACK), SP ; set up stack
main: NOP ; main program
MOV.W #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer
BIS.B #0xFF,&P1DIR ; configure P1.x as output
BIS.B #0xFF,&P2DIR ; configure P2.x as output
BIS.B #0xFF,&P3DIR ; configure P3.x as output
BIS.B #0xFF,&P4DIR ; configure P4.x as output
MOV.W #arr1, R4 ; load the starting address of the array1 into
the
register R4
MOV.W #arr2, R5 ; load the starting address of the array1 into
the
register R4
; Sum arr1 and display
CLR R7 ; Holds the sum
MOV #8, R10 ; number of elements in arr1
lnext1: ADD @R4+, R7 ; get next element
DEC R10
JNZ lnext1
MOV.B R7, P1OUT ; display sum of arr1
SWPB R7
MOV.B R7, P2OUT
; Sum arr2 and display
CLR R7 ; Holds the sum
MOV #7, R10 ; number of elements in arr2
lnext2: ADD @R5+, R7 ; get next element
DEC R10
JNZ lnext2
MOV.B R7, P3OUT ; display sum of arr1
SWPB R7
MOV.B R7, P4OUT
JMP $
arr1 DC16 1, 2, 3, 4, 1, 2, 3, 4 ; the first array
arr2 DC16 1, 1, 1, 1, -1, -1, -1 ; the second array
END
This has to be in MSP430 assembly language. Thank you! Here is a link with instructions...
must be written in assembly code Write an MSP430 assembly language subroutine, REP_FREE, to examine the elements of an array of positive word-size numbers stored at location ARRAY_IN. The array is already sorted in an ascending order. The first element is the number, n,which is the length of the array. The subroutine will copy the elements from location ARRAY_IN to location ARRAY_OUT. While copying, if an element appears more than once (repeated), then the repeated copies are ignored. In essence,...
at ll 7:06 PM 31% 1-Q4H-TI-V14-F... 331 . Intro. to Microcomputers Su a 19.9:45 am Q4H, Page 1/1 sem Alhalabi, EE512 Due Jul 3, 2019 Jun 26, 2019 Grade /10 Write an MSP430 assembly language filtering subroutine, ClipFilter, to examine the elements of a list of positive word-size numbers stored at location pointed to by R5. These numbers are actually the digitized values of a sample of analog waveform. The first word in the list is the length of the...
Programming language: Java
Home Work No.2 due 09.11.2019 either ascending or descending SORTING: An array is said to be ordered if its values order. In an ascending ordered array, the value of each element is less than or equal to the value of the next element. That is, [each element] <= [next element]. A sort is an algorithm for ordering an array. Of the many different techniques for sorting an array we discuss the bubble sort It requires the swapping...
Assembly Language Programming Assignment program must be in: MASM assembly language / x86 architecture / irvine library procedures Objectives: 1. using register indirect addressing 2. passing parameters 3. generating “random” numbers 4. working with arrays Description: Write and test a MASM program to perform the following tasks: 1. Introduce the program. 2. Generate ARRAYSIZE random integers in the range [LO = 10 .. HI = 29], storing them in consecutive elements of an array. ARRAYSIZE should be set to 200....
Question from Object-Oriented Data Structures Using Java 4th Edition Chapter 5 Question 30 Add the following methods to the LinkedCollection class, and create a test driver for each to show that they work correctly. Code each of these methods by accessing the internal variables of the LinkedCollection, not by calling the previously defined methods of the class.String toString() creates and returns a string that correctly represents the current collection. 1. Such a method could prove useful for testing and debugging...
Here is the IntegerLinkedList_incomplete
class:
public class IntegerLinkedList {
static class Node {
/** The element stored at this node */
private int element; // reference to the element stored at this node
/** A reference to the subsequent node in the list */
private Node next; // reference to the subsequent node in the list
/**
* Creates a node with the given element and next node.
*
* @param e the element to be stored
* @param n...
Modify the LinkedCollection class to be a SortedLinkedCollecton class and see how that effects our implementation for adding and removing items. You should reference the SortedArrayCollection class provided for how these algorithms should be implemented. What needs to change here? Is it a lot of code or not much? Include a toString method that creates and returns a string that correctly represents the current collection. Include a test driver application that demonstrates your class correctly. //--------------------------------------------------------------------------- // LinkedCollection.java // //...
//Generic interface that describes various searching and sorting //algorithms. Note that the type parameter is unbounded. However, //for these algorithms to work correctly, the data objects must //be compared using the method compareTo and equals. //In other words, the classes implementing the list objects //must implement the interface Comparable. The type parameter T //is unbounded because we would like to use these algorithms to //work on an array of objects as well as on objects of the classes //UnorderedArrayList and...
java
Create the following classes: DatabaseType: an interface that contains one method 1. Comparator getComparatorByTrait(String trait) where Comparator is an interface in java.util. Database: a class that limits the types it can store to DatabaseTypes. The database will store the data in nodes, just like a linked list. The database will also let the user create an index for the database. An index is a sorted array (or in our case, a sorted ArrayList) of the data so that searches...
Java Programming Write a program to find the number of comparison using binarySearch and the sequentialSearch algorithms as follows: Suppose list is an array of 2500 elements. 1. Use a random number generator to fill list; 2. Use a sorting algorithm to sort list; 3. Search list for some items as follows: a) Use the binary search algorithm to search list (please work on SearchSortAlgorithms.java and modify the algorithm to count the number of comparisons) b) Use the sequential search...