subject

Write a MASM program to calculate Fibonacci numbers:
1. Display the program title and your name. Then get the user's name and greet the user.
2. Prompt the user to enter the number of Fibonacci terms to be displayed. Advice the user to enter an integer in the range [1 - 46).
3. Get and validate the user input.
4. Calculate and display all of the Fibonacci numbers up to and including the nth term. The results should be displayed 5 terms per line with at least 5 spaces between terms.
5. Display a goodbye message that includes the user's name and terminates the program.
Requirements:
1. The main procedure must be divided into the following sections:
a. Introduction
b. User instructions
c. Get the data
d. Calculate and display Fibonacci numbers
e. Say goodbye
2. The loop that implements data validation must be implemented as a post-test loop.
3. The loop that calculates the Fibonacci terms must be implemented using the MASM loop instruction.
4. The upper and lower limits should be defined as constants
5. All the requirements regarding documentation, readability, user-friendliness apply.
Notes:
1. You can display the Fibonacci numbers as they are generated. You don't need to store them.
2. The first two Fibonacci terms are both 1. All other terms are the sum of the two previous terms. E. g. term-3 = term-1 + term-2
Example execution (user input is in italics):
Fibonacci Numbers
Programmed by Leonardo Pisano
What's your name? Jerry
Hello, Jerry
Enter the number of Fibonacci terms to be displayed
Give the number as an integer in the range (1 .. 46).
How many Fibonacci terms do you want? 50
Out of range. Enter a number in [1 ..46]
How many Fibonacci terms do you want?
1 2 3 4 5
8 13 21 34 55
89 144 233 377
Results certified by Leonardo Pisano.
Goodbye, Jerry

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
How can a user delete a drawing object
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a.if the manual switch s is on, then the light l is on. b.besides the manual switch, there is a motion detector, m1, which activatesthis light.c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d.the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
You know the right answer?
Write a MASM program to calculate Fibonacci numbers:
1. Display the program title and your na...
Questions
question
Mathematics, 20.05.2021 04:40
question
Mathematics, 20.05.2021 04:40
question
Mathematics, 20.05.2021 04:40
question
Social Studies, 20.05.2021 04:40
question
Mathematics, 20.05.2021 04:40
question
Mathematics, 20.05.2021 04:40