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
-
The notes are part of the financial statements. They give details that would clutter the statements. This case will help you learn to use a company's inventory notes. Refer to Apple Inc.'s...
-
Suppose you read a story that claims an insurance company is monitoring their customers' driving habit. On what type of data source in the claim in this story based? A. These data are distributed by...
-
Reconsider the data from Problem 56. What is the capital recovery cost of Model 334A? Data from problem 56 Octavia Bakery is planning to purchase one of two ovens. The expected cash flows for each...
-
Xinhong Company is considering replacing one of its manufacturing machines. The machine has a book value of $ 45,000 and a remaining useful life of 5 years, at which time its salvage value will be...
-
Arrow Hospitality prepares adjustments monthly and showed the following at September 3 0 , 2 0 2 3 : ARROW HOSPITALITY Trial Balances September 3 0 , 2 0 2 3 Unadjusted Adjusted Trial Balance...
-
The following are selected account balances from Penske Company and Stanza Corporation as of December 31, 2021: Penske Stanza Revenues $ (834,000 ) $ (500,000 ) Cost of goods sold 296,900 125,000...
-
Unlike most tangible project management functions, motivation is not designated by the project manager to a team member, instead motivation is internal to each team member and derived from a team...
-
Efficient Markets Hypothesis Suppose the market is strong form efficient. Can you expect to earn excess returns if you make trades based on: (a) An analysts forecasts about future company earnings?...
-
Is it possible that a risky asset could have a beta of zero? Explain. Based on the CAPM, what is the expected return on such an asset? Is it possible that a risky asset could have a negative beta?...
-
Repeat Problem 10-6 for the instruction SLT R7 R3 R5 with R3 containing 0000F001 and R5 containing 0000000F. Problem 10-6 For the RISC CPU in Figure 10-8, manually simulate, in hexadecimal, the...
-
Vestas Wind Systems A/S, the Danish wind energy company, would like to consider hedging the risk of its operations. What are the main risks the company faces and how would it hedge these risks?...
-
Efficient Markets Hypothesis A famous economist just announced in the Financial Times his findings that the recession is over and the economy is again entering an expansion. Assume market efficiency....
-
Kevin and Jennifer are married and filing a join tax return. They have a combined taxable income of $ 8 0 . 0 0 0 . They have four children, whom they claim as dependents. When they file their 2 0 2...
-
In July 2013, cnet.com listed the battery life (in hours) and luminous intensity (i. e., screen brightness, in cd/m2) for a sample of tablet computers. We want to know if screen brightness is...
-
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...
-
Explain how to present the various elements of a clients quarterly report.
-
Explain how nudging alone constitutes a narrow use of behavioral finance knowledge.
-
Discuss the meaning of risk tolerance.
Study smarter with the SolutionInn App