How to write in assembly language

Assignment Help Business Management
Reference no: EM132291869

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: EM132291869

Questions Cloud

Describe the concept of polymorphism : Describe the concept of polymorphism. Provide an example to illustrate your point. The example may be pseudocode
Significance of declaring a reference parameter : What is the significance of declaring a reference parameter or a pointer parameter as a const parameter?
Explain the concept of encapsulation : Explain the concept of encapsulation. Provide an example to illustrate your points and also provide the pseudocode
Define a variable called ptrage : In the space below, define a variable called ptrAge that is a pointer to an integer value and explain?
How to 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
Chipotle to revise the company food-handling standards : Why is it important for Chipotle to revise the company's food-handling standards?
What are the common errors that can occur : What are some ways to avoid these errors? What are some things to look for when a query does not return the results you expected?
Written and communicated vision and mission statement : A key element of any organization strategic plan is a clearly written and communicated Vision and Mission statement.
Why should organisations care about setting egress : Why should organisations care about setting egress (outbound) firewall rules?

Reviews

Write a Review

Business Management Questions & Answers

  What are the downsides for entrepreneurial ventures

What are the downsides for entrepreneurial ventures when an effective business model isn't put in place? Respond to two of your classmates' postings.

  The methodology of constructing and using control charts

The methodology of constructing and using control charts. Include in your discussion 1) what one should look for in interpreting control charts 2) the possible causes of different out-of-control indicators (provide an example).

  Social networks of that organization

Think of an organization that you are familiar with and the social networks of that organization. Using information from the Li and Hung article as well as your understanding of FRLD,

  What types of permits and zoning ordinance did stengard need

How important was the location decision for these two entrepreneurs? Why? What types of permits and zoning ordinances did Stengard and Piel need to consider before deciding to relocate?

  Theoretical models to produce strategic recommendations

Within this you must utilize at least two (2) theoretical models to produce strategic recommendations for the hotel.

  Explaining ineffectual leadership and mid-level managers

Using the article Leadership Truths what advice would you give to a company that has ineffectual leadership, mid-level managers who don't have the authority.

  Lot of time discussing mass incarceration

This week, we spent a lot of time discussing mass incarceration, the war on drugs, and racial inequity. In recent times, a racial justice social movement has emerged directly challenging what Michelle Alexander calls

  Why is operational management important to an organization

Why is operational management important to an organization?

  Write the program to create the new file named file1

Write the program to create the new file named File1.txt. Write 100 integers created randomly into the file using text I/O. Integers are separated by a space.

  Operations management areaswhat is your opinion on the

operations management areaswhat is your opinion on the questions below?what are some common elements or aspects of the

  Discussing training and developmentshow in detail task

discussing training and developmentshow in detail task analysis and performance analysis in relation to the training

  What are the four types of planning

What are the four types of planning and how are they related to organizational goals?

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