Assembly language program

Assignment Help Programming Languages
Reference no: EM13192458

Write a program called A2P1 to run in the LC-3 simulator. The program asks for the user to type in his or her UPI. Then the program asks for the age of the user and prints the UPI out that many times. Here is an example of input and what should be produced in the simulator's console window.

1085_Assembly language program.png

For Part I you may assume (in fact you must assume) that the input provided will always match what is expected. i.e. do not consider what would happen if the user makes a mistake entering data.

The program should work exactly like this:

The program displays "Enter your upi: ".

It then waits until the user has typed 7 characters (these get stored by the program). The characters typed by the user are shown on the console as the user types them. After the 7th character the console output goes to the next line automatically without the user having to type return/enter and displays "Enter your age: " 

It then waits until the user has typed a number (you may assume it will always be between 0 and 999) and has pressed return/enter.

Once again the characters typed by the user are shown (echoed) on the console as the user types them. Then the program prints the upi the same number of times as the user's entered age. Each upi appears on a separate line.

Reference no: EM13192458

Questions Cloud

What price-output combination would exist with profit : Suppose a natural monopolist has fixed costs of $24 and a constant marginal cost of $2. The demand for the product is as follows: Price (per unit) $10 $9 $8 $7 $6 $5 $4 $3 $2 $1 Quantity demanded (units per day) 0 2 4 6 8 10 12 14 16 18
Explain the chromium in the ore as chromium phospate : A 6.50 gram sample of an ore containing chromium is dissovled and then treated with an excess of Na3PO4 (aq), which precipitates out all of the chromium in the ore as chromium (III) phospate, CrPO4.
Organizational citizenship behavior : The willingness to go beyond one's job description without an obvious reward is called organizational citizenship behavior.
What is the area of the shaded sector in between : if the radius of a circle is 14 inches and the arc of the circle is 30 degrees. what is the area of the shaded sector in between?
Assembly language program : Write a program called A2P1 to run in the LC-3 simulator. The program asks for the user to type in his or her UPI.
Find the width of the box : A company wishes to manufacture a box with a volume of 24 cubic feet that is open on top and is twice as long as it is wide. Find the width of the box that can be produced using the minimum amount of material. Round to the nearest tenth, if necess..
What is the probability that the ball drawn is white : An urn contains a white balls and b black balls. After a ball is drawn, it is returned to the urn if it is white; but if itis black, it is replaced by a white ball from another urn. Let M(n) denote the expected number of white balls in the urn aft..
Calculate the volume of calcium hydroxide : Calculate the volume of 1.00 M nitric acid needed to react completely with 25.0mL of 1.84 M calcium hydroxide
Define contract be enforced under bargain theory of contract : The day after Thanksgiving, I've already invested time and money in training you, and don't have time to train a replacement; you suddenly realize you're in a strong bargaining position, and threaten to quit unless I raise your salary.

Reviews

Write a Review

Programming Languages Questions & Answers

  Expression whose value is distance between two point

a structured type with two fields, x and y, both of type double-- write an expression whose value is the distance between the two point represented by p1 and p2.

  Create program to enter number of packages bought

Create a program which asks user to enter number of packages bought . The program must then display amount of discount (if any) and total amount of purchase after the discount.

  Create class to store the product name

Choose a fruit or vegetable product that you might commonly find at the farmers market (for example, tomatoes, potatoes, lettuce, apples, cantaloupes, etc). Create a class that stores the product name.

  Write application to compute the total cost of new carpet

Write the application which computes the total cost of new carpet for a rectangular room. Application must first ask user for the current cost of the carpet per square foot. It then asks for both length.

  Write gui program as subclass of jframe

Write a GUI program as subclass of JFrame. It should contain the following: Labels At the top (column headings): Meal, Quantity, Cost, At the left: label for each mea.

  Write program which functions similarly to atm

Write program which functions similarly to the ATM. A user must be able to give their account number, choose whether they want to make a deposit or a withdrawal

  General layout for a web-based source document

Suggest the general layout for web-based source document that prospective sellers could use to explain their antiques. Information must include the user ID, password, item, dimensions, origin, condition, and asking price.

  Program instantiates four dates and allots invalid values

Demonstration program instantiates four Dates and purposely allots invalid values to some of arguments; class methods will correct invalid values.

  Write program to enter numeric values-arithmetic operator

Write a program that lets the user enter 2 numeric values, and an arithmetic operator: +, -, * and /. Write a switch statement that displays the result.

  Fortran-77 to sort an array of numbers entered

Write a program in Fortran-77 to sort an array of numbers entered from the keyboard and then using binary search, search for a number in the array.

  Program to prompts user for integer and print prime number

Give a program which will compile in VS 2010. Write a program to prompts user for integer and then prints out all prime numbers up to that integer.

  Create a program to store assignment grades for student

The elementary school for which you are doing development work has asked you to create a program to store assignment grades for one student.

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