Return the index of the array element

Assignment Help Assembly Language
Reference no: EM132694300

Pass to a subroutine an array by reference (i.e. pass the address of the array), the size of the array, and a number. The subroutine should search for that number within the array elements and return the index of the array element if the matching number is found. If no matching number is found, then the subroutine should return -1.

For example: Assume the array is at address 0x20004000, the array size is 5, and the number you are looking for is 0xA. You pass the address of the array, the size of the array and the number you are looking for as arguments to the subroutine. The subroutine returns the index of the element that contains 0xA, or returns -1 if no 0xA is found in the array.

NOTE: You have to obey the ARM procedure call standards when passing arguments and returning values.

Reminder: The index of an array starts at zero.

Reference no: EM132694300

Questions Cloud

The prime minister powerful better half : Based on the excerpt from Ho Ching's speech, what type of tactics does she use to influence the behavior of others?
How do influence the people and systems in life : How do you influence the people and systems in your life? Provide some concrete examples of how you can impact specific people or systems around you.
Journalize the adjusting entry on December for amortization : On December 31, it was estimated that goodwill of $6,000,000 was impaired. Journalize the adjusting entry on December for amortization
What is the value of a 9-month european put option : The risk-free interest rate is 9% per annum with continuous compounding. What is the value of a 9-month European put option with a strike price of $48?
Return the index of the array element : Elements and return the index of the array element if the matching number is found. If no matching number is found, then the subroutine should return -1
Describe the purpose most affected by the program : Describe the purpose and the resource(s) most affected by the program. Write an essay that identifies and selects a military installation that is implementing
Pros and cons as well as comparison of the platforms : Analyze each tool, providing a list of pros and cons as well as a comparison of the platforms. Additionally, what one thing does each tool do very well?
What is the maximum potential profit : Suppose you purchase one XYZ August 100 call contract at $6.5 and write one XYZ August 110 call contract at $0.5.
Determine the amount of depletion expense : Glacier Mining Co. acquired mineral rights for $494,000,000. Determine the amount of depletion expense for the current year

Reviews

Write a Review

Assembly Language Questions & Answers

  Design a calculator in assembly

Design a calculator in assembly that can handle +,-,/,%, * and expresses errors in the case of division by zero or invalid characters using the template below.

  Program that converts the temperature

Write a program that converts the temperature F in Farenheit to C in Celsius using C = (F-32)*5/9. For ease of programming you can display the result in fractions

  Describe what will happen to the status flags

ECE 2510 Introduction to Microprocessors - Implement the following operation in assembly program for IA-32 without using mul & div instructions and Describe what will happen to the status flags

  Write program which should first ask for five random numbers

You are to write a program which should first ask for 5 random numbers from 0-20 (user will input these numbers in no preset order). Input these 5 numbers in variables called num1, num2, num3, num4, and num5.

  Displays a single character at 100 random screen

Write a program that displays a single character at 100 random screen locations, with a delay factor of 100 milliseconds.Hint: set the console window screen height to 200 at runtime.

  Create a basic i-o (input/output) library of subroutines

For this lab, you will create a Basic I/O (input/output) Library of subroutines. There are 7 subroutines in this library, 4 of which you must write. The lowest level routines have been provided for you and are in the file BasicIO.asm. They are:

  Define a second byte array to store the frequencies

Write a code block to print the content of chA and write a code block to print the transpose of chA - Write a code block to compute the individual summation per each column, per each row and the overall summation of chA.

  Wrote a new value into the Timer or Counter register

ECE 375: Computer Organization and Assembly Language Programming Lab - Timer/Counters. In this lab, you used the Fast PWM mode of both 8-bit Timer/Counters

  Build an 8088 assembler

In this project, you will build an 8088 assembler. The job of your assembler is to turn 8088 assembly code (i.e., the 8086 assembly code language) into 8088 machine code that executes in an DOS emulator.

  What is the proper way to define an assembly code

What is the proper way to define an assembly code in in-line assembler x86 for this case: multiplication without using mul/imul, using hexadecimal numbers.

  Explain about the ascii functions

Explain about the ASCII functions we use in assembly language programming

  Write an assembly program to implement finite state machine

In this lab we will write an assembly program to implement a Finite State Machine (FSM) that recognizes hexadecimal integer constant that conforms to MASM syntax.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd