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

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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