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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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