Write program that asks user to enter integer dollar amount

Assignment Help Assembly Language
Reference no: EM132232495

Assignment -

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 = size of array / size of lower;

int incex = 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' qualified for inclusion into the 'sum' and what the final value of the variable 'sum' was. (Hint: you may have to add another variable.) Feel free to use the author's procedures in the book's link library. Use only the procedures that were introduced in chapter 5.

Part 2 - Write an assembly language 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 "sentinel 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

Reference no: EM132232495

Questions Cloud

Standard deviation of a sampling distribution : Find the mean and standard deviation of a sampling distribution of sample means with sample size n=49
Solve the challenge for enterprises ranging : Data loses its value when it can't be analyzed fast enough. Edge computing and analytics can solve the challenge for enterprises ranging from oil and gas.
Secure information on customer or stakeholder expectations : When attempting to secure information on customer or stakeholder expectations, there are a number of ways of getting information.
What is the probability that he will select 4 : What is the probability that he will select 4 red balls and 3 white balls? Round your answer to 3 decimal places.
Write program that asks user to enter integer dollar amount : Write an assembly language program that asks the user to enter an integer dollar amount between 1 and 5,000
Company wants to sponsor the fastest : A running shoe company wants to sponsor the fastest 5% of runners. You know that in this race, the running times are normally distributed
What is a system unit : Add the following topics in word one after the other: 1024 MB [1GB] of RAM (specifically, how much does it cost?) What is a System Unit?
Percentage of massachusetts voters : Data showing the percentage of Massachusetts voters that are registered democrats
Federal student loans dischargeable in bankruptcy : Is this possible even though he is making all the required minimum payments each month and are federal student loans dischargeable in bankruptcy??

Reviews

Write a Review

Assembly Language Questions & Answers

  Write a function in linux assembly

Write a function in Linux assembly

  Assembly language program that display 0 through 9 on screen

Write, build, and run an assembly language program that displays 0 through 9 on the screen. You can only use the following data segment.

  Write an assembler for the given instructions

Write an assembler for the following instructions. The output of your program is a text file that contains the object code.

  Bresenham''s algorithm for drawing a line

This assignment is about writing a line drawing subroutine in ARM assembly language. The following is a C implementation of Bresenham's algorithm for drawing a line between two points.

  Write assembly language program for the marie processor

Please refer to the attachment for the general structure of the assembly language source code and more specifications regarding the assembly program

  Assembly language program to accept positive integer values

Write a 68000 assembly language program to accept positive integer values m, b, and x from the keyboard, compute the value of f using the formula

  Register address machine

Express the statement X= (A*B)-(C*D)-E in the assembly language of each of 0- memory address machine, 3-register address machine with 3 registers R1,R2,R3, and 2-memory-register-address machine with three registers R1,R2, R3. Your solution should use..

  Geometric shape calculator companion

Modular organization using procedures, subroutines and functions - Use of the system Stack to save and restore register values, pass arguments, receive results

  Assembly language program that generates and displays

Write a assembly language program that generates and displays 20 random strings, each consisting of ten letter(A-Z, a-z)s or number(0-9)s.

  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 hallmark of an assembly language

What is the hallmark of an assembly language? Distinguish between an assembler and a compiler. Distinguish between a compiler and an interpreter.

  Write a program that displays a single character

Write a program that displays a single character in all possible combinations of foreground and background colors (16 16 256). The colors are numbered

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