Reference no: EM13166983
Write an ARM assembly function that takes an array of integers and returns the index of the first occurrence of the integer in the array if it exists or -1 if it does not. Remember the initial integer in the array is at index zero.
The C language program is:
#include <stdio.h>
extern int intfind( int array[], int lookfor, int size ) ;
void main( int argc, char * argv[] )
{
int numarray[] = { 113, 114, 252, 280, 332 };
int lookfor = 252 ;
int size = sizeof(numarray)/sizeof(int) ;
int result ;
result = intfind( numarray, lookfor, size ) ;
printf( "Integer appears at %d\n", result ) ;
}
The input to the ARM assembly language function is a pointer to the first element of the array in register a1. The integer to look for is in a2 The size of the array is in a3and is the number of integers. Remember an integer is 4 bytes long.
Creates a bus class
: write a program that creates a bus class. create a constructor that initializes the number of passengers and number of seats. declare four objects. use the default copy constructor to initialize two of the objects.
|
A pattern detector has an input
: A pattern detector has an input a 4 x 4 matrix whose elements take values a, b, c, or d. The output is 1 if the matrix contains one b surrounded by eight a's and 0 otherwise.
|
T prints out, on a clear screen, a table of temperatures
: Create a MATLAB program (utilizing a temp-conversion function) that prints out, on a clear screen, a table of temperatures.
|
Write a java program that reads unspecified number
: Write a java program that reads unspecified number of integers (the input 0 signifies the end of the input). Calculates and displays the sum and the average of the input value (not counting zero). The program also finds the maximum and minimum of ..
|
Write an arm assembly function that takes an array of intege
: Write an ARM assembly function that takes an array of integers and returns the index of the first occurrence of the integer in the array if it exists or -1 if it does not. Remember the initial integer in the array is at index zero.
|
The radix sort algorithm
: Show what happens to the radix sort algorithm if the counting sort is not a stable sorting algorithm. Bring a counter example
|
Create a program that will round a floating point
: Create a program that will round a floating point value to a specified number of decimal places as input by the user. To perform the actual calculation, write a function that takes the user's value and the number of decimal places as input paramet..
|
First integer of input refers to the total weight the ship
: First integer of input refers to the total weight the ship can carry. Second integer refers to the number of cargo present and the rest of the integers represents the individual weight of the cargo
|
First integer of input refers to the total weight the ship
: First integer of input refers to the total weight the ship can carry. Second integer refers to the number of cargo present and the rest of the integers represents the individual weight of the cargo
|