Write in assembly language

Assignment Help Basic Computer Science
Reference no: EM132290910

Problem:

Starting with the following C++ program:

#include <iostream>

using namespace std;

extern "C" long Average (long, long []);

void main ()

    {

    long Array1 [10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

    long Array2 [11] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};

    cout << "Average of Array1 is " << Average (10, Array1) << endl;

    cout << "Average of Array2 is " << Average (11, Array2) << endl;

    }

How to Write in assembly language (in a separate file named Lab8.asm) the function Average. The first parameter is the number of elements in an array, the second is the address of the array. The function will determine the average of the values in the array and return the average rounded to the nearest whole number (if the fractional part of the result is equal to or greater than .5, the result is rounded to the next higher number.

Reference no: EM132290910

Questions Cloud

Example of inheritance : Provide an example of inheritance and please explain the example.
Explain the concept of encapsulation : Explain the concept of encapsulation. Provide an example to illustrate your points and also provide the pseudocode
Strategy enterprise consider firing unprofitable customer : Under what conditions should a customer-strategy enterprise consider firing an unprofitable customer?
Pointer to an integer value and explain : In the space below, define a variable called ptrAge that is a pointer to an integer value and explain?
Write in assembly language : How to Write in assembly language (in a separate file named Lab8.asm) the function Average. The first parameter is the number of elements in an array
What are some ways to avoid these errors : What are the common errors that can occur when writing SQL queries such as SELECT WHERE. What are some ways to avoid these errors?
Control chart is the right tool for quality conformance : Describe a situation where a control chart is the right tool for quality conformance.
Deal with possibility that customer satisfaction : As a manager, how would you deal with the possibility that customer satisfaction does not always lead to customer retention?
Firewalls have the capability to block both ingress : Firewalls have the capability to block both ingress (inbound) and egress (outbound) traffic. Many organisations (and also true for my home NBN router)

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What will happen to the price per share of company

This new growth strategy will require the company to reinvest 30% of their earnings starting at the end of this year (t = 1).

  Write the code for the following assignment

In this exercise, you'll make a form that accepts one or more scores from the user. Each time a score is added, the score total, score count, and average score

  How are businesses using social networking

Social networking seems to have taken over our lives! Almost everyone is on Facebook and Twitter. But is this a good thing?

  Calculate the decision npv

a. Calculate the decision's 1-day change in value. b. Calculate the decision's NPV.

  Write a letter of interest to a prospective employer listing

Look up a job that you want to have after college, write a letter of interest to a prospective employer listing: Who you are?What skills you have that are relevant for this job?Why you are interested in the job?

  Innovation and organizational processes

Examine potential changes in IT related to innovation and organizational processes. List and describe internal (online) information security risks and mitigation tactics and how they will effect decision-making strategies.

  Explain the main differences between xdm and kdm

Which file does the administrator need to modify in order to achieve this? Explain the main differences between XDM and KDM. Which would you prefer?

  What is regex and how do we use it

Can anyone tell us how to add "Do Use" Assertions to Validate Arguments to a private Method?

  Design a double-sided board and use vendor catalogs

Be sure to include the following: a schematic drawing, a fabrication drawing, circuit side artwork, component side artwork, a silkscreen, and a final assembly drawing.

  What is the swap space amount for the bash command

If using a long listing and no process modifiers, what is the swap space amount for the bash command?

  Discuss developing a mechanism within http for doing this

Discuss developing a mechanism within HTTP for doing this.

  Show students are making satisfactory progress in reading

Reading. To measure progress in reading ability, students at an elementary school take a reading comprehension test every year.

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