Write a program in Assembly that will use a loop to print all of the numbers...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program in Assembly that will use a loop to print all of the numbers between a user input integer x and 0 inclusive. If the integer being printed is even, print the actual number. If the integer is odd, print a hashtag (#) instead. Separate each integer (or #) with an underscore ) but do not display an underscore before the first output nor after the final 0. If the user input integer x is a negative number, the program should halt immediately with no output. Ensure the code is commented thoroughly. Some sample runs are shown below. Other input values would produce different results. Enter an integer: 8 Enter an integer: 7 8__6__4__2_+_0 +_6_4_4__2__0 Enter an integer: -5 Enter an integer: 0 program is finished running a) Write a program to solve the problem as indicated. Include an ID box and purpose. b) Save this program as "L11Q2initials.asm" replacing initials with your actual initials. c) Submit your file electronically for marking (unless otherwise instructed). Write a program in Assembly that will use a loop to print all of the numbers between a user input integer x and 0 inclusive. If the integer being printed is even, print the actual number. If the integer is odd, print a hashtag (#) instead. Separate each integer (or #) with an underscore ) but do not display an underscore before the first output nor after the final 0. If the user input integer x is a negative number, the program should halt immediately with no output. Ensure the code is commented thoroughly. Some sample runs are shown below. Other input values would produce different results. Enter an integer: 8 Enter an integer: 7 8__6__4__2_+_0 +_6_4_4__2__0 Enter an integer: -5 Enter an integer: 0 program is finished running a) Write a program to solve the problem as indicated. Include an ID box and purpose. b) Save this program as "L11Q2initials.asm" replacing initials with your actual initials. c) Submit your file electronically for marking (unless otherwise instructed).
Expert Answer:
Related Book For
Digital Design and Computer Architecture
ISBN: 978-0123944245
2nd edition
Authors: David Harris, Sarah Harris
Posted Date:
Students also viewed these programming questions
-
Nootan Ltd arrived at a net profit of Rs 100000 for the year ended 31st March, 2022. Depreciation for the year is Rs 10000, Loss on sale of Asset is Rs 20000, Interest paid on loan is Rs 10000, Gain...
-
Write a program in JavaScript that accepts an integer greater than 2 and tells whether it is a prime number. Note that JavaScript has if and while statements with the same syntax as C and Java. The...
-
Write a program in your favorite language (e.g., C, Java, Perl) to convert numbers from binary to decimal. The user should type in an unsigned binary number. The program should print the decimal...
-
Describe the graphs of the equation. x 2 + y 2 3
-
How does testing the significance of the entire multiple regression model differ from testing the contribution of each independent variable?
-
The picture shows a ruler with a reference origin and six positions labeled. ORIGIN WOX Y Z U V 1 2 3 centimeters 6 7 A student places a small pebble at a position -1 cm relative to the origin. If...
-
Symbol B could represent (a) computation of net pay. (b) separation of erroneous time cards. (c) validation of payroll data. (d) preparation of the payroll register.
-
Southern Copper Corporation (PCU) acquired mining equipment for $100,000 cash on January 1, 2009. The equipment had an expected useful life of four years and zero salvage value . PCU calculates...
-
Question 3 (40 marks) Please let me know how can i send the excel worksheet for this question. Provide a recommendation as to which one of the two REITs below you would recommend to an investor. The...
-
3. Location Choice There is a new tech company Humbl", with a single consumer market in town A. Humbl uses two inputs, these are obtained from respectively the cities B and C, which are 600...
-
Mini-Case BestSellers Bookstore Bob Gilmartin decided to leave his job as a manager at a well-known corporate hotel chain to open BestSellers Bookstore in the heart of Torontos business district....
-
A company manufactures rubber balls. The mean diameter of a ball is 12 cm with a standard deviation of 0.2 cm. Define the random variable X in words. X = ______________.
-
What is the z-score of x = 9, if it is 1.5 standard deviations to the left of the mean?
-
If the area to the left of x in a normal distribution is 0.123, what is the area to the right of x?
-
What is the probability of spending more than two days in recovery? a. 0.0580 b. 0.8447 c. 0.0553 d. 0.9420 The patient recovery time from a particular surgical procedure is normally distributed with...
-
What is the theoretical mean? A distribution is given as X ~ U(0, 12).
-
Garcia Industries uses a cost system that carries direct materials inventory at a standard cost. The controller has established these standards for the cost of one unit: Standard Quantity X Standard...
-
Wal-Mart is the second largest retailer in the world. The data file on the disk holds monthly data on Wal-Marts revenue, along with several possibly related economic variables. a) Using computer...
-
Design a modified priority encoder that receives an 8-bit input, A 7:0 , and produces two 3-bit outputs, Y 2:0 and Z 2:0 Y indicates the most significant bit of the input that is TRUE. Z indicates...
-
Design a serial (one bit at a time) twos complementer FSM with two inputs, Start and A, and one output, Q. A binary number of arbitrary length is provided to input A, starting with the least...
-
Build a 32-bit synchronous Up/Down counter. The inputs are Reset and Up. When Reset is 1, the outputs are all 0. Otherwise, when Up = 1, the circuit counts up, and when Up = 0, the circuit counts...
-
An income statement for Cheries Pizza is included in the Working Papers. 1. Use the following information to calculate the breakeven point in sales dollars and unit sales for July. The August...
-
Use the working papers and data from Work Together 15-2. Forms for completing this Work Together are provided in the Working Papers. Your instructor will guide you through the following examples. 1....
-
Use the February information from the Work Together above. An income statement for Wightman Lumber is included in the Working Papers. Work independently to complete this problem. 1, Prepare Wightman...
Study smarter with the SolutionInn App