Reference no: EM131015267
part 1: Implement the following C++ code fragment in assembly language. Use the block-structured .IF and.WHILE directives. Assume that all variables are 32-bit integers.
int array[] = {3,1,4,1,5,9,2,6, 5,3,5,8,9,7,9,3,2,3,8,4};
int lower = 3;
int upper = 8;
int ArraySize = sizeof array / sizeof lower;
int index = 0;
int sum = 0;
while( index < ArraySize )
{
if( array[index] >= lower && array[index] <= upper )
{
sum += array[index];
}
index++;
}
Your assembly language program must also display as output the number of times a member of ' array 'e qualified for inclusion into the 'sum 'e and what the final value of the variable ' sum 'e was.
Part 2: Write a program that asks the user to enter an integer dollar amount between 1 and 5,000. Your program should display the corresponding class description using the following table. Write the program so that it executes until the user inputs some value that you determine to be the "stop value". Your program must guard against and provide user messages for input values that are outside the valid range.
Donation Amount (dollars)
|
Class of Donation
|
$4,000 to $5,000
|
Platinum
|
$3,000 to $3,999
|
Gold
|
$2,000 to $2,999
|
Silver
|
$1,000 to $1,999
|
Bronze
|
$1 to $999
|
Copper
|
Gain or loss did bogus recognize on the exchange
: What gain or loss did Bogus recognize on the exchange, assuming no commercial substance 48,600 loss 24,000 gain 0 gain/loss none of the above
|
Compute the amount of goodwill acquired by winans
: At the time of purchase, Aumont's balance sheet showed assets of $611,070, liabilities of $201,660, and owners' equity of $409,410. The fair value of Aumont's assets is estimated to be $819,560. Compute the amount of goodwill acquired by Winans.
|
What is the total amount of debt
: forfeitures of benefits under the plan may be reallocated to the remaining participantsthe company must make contributions to the plan if it has profits during the year.
|
Description of the community you selected
: description 2 Pagea description of the community you selected (New York, or Any American Urban City). Then, explain the strengths and challenges associated with that community based on its characteristics. Finally, explain how you, as a social wor..
|
What the final value of the variable sum e was
: Write a program that asks the user to enter an integer dollar amount between 1 and 5,000. Your program should display the corresponding class description using the following table. Write the program so that it executes until the user inputs some v..
|
Types of natural and man-made disasters and attacks
: What type of natural hazard do you think is the most significant or troublesome to emergency managers - what type of man-made hazard do you think is the most significant or troublesome to emergency managers? Why?
|
Was the study design cross-sectional or longitudinal
: What were the units of analysis? Were they appropriate for the research question? Was the study design cross-sectional or longitudinal? Was a sample or the entire population of elements used in the study? What type of sample was selected
|
Activity rate for product design activity cost pool
: What is the activity rate for the Product Design activity cost pool? Product design activity cost pool $ per product
|
Predominantly substantive approach
: Which of the following audit strategies would be most appropriate when an auditor has assessed a predominantly substantive approach is necessary to determine inventory quantity?
|