4. Write a LMC program that begins by accepting an input number. With each input instance, the program keeps track of the highest number entered so far. The program should loop indeterminate number of times but from the second input onward if a 0 (zero) is input, the program outputs the current highest number and stop. [20 marks] Hints: O O O O It may be useful to review and modify Question #2 in the LMC-Challenge. Begin program sequence at location address 00. Indicate each address, mnemonic and numerical instruction. In the first iteration, if the second input number is 0, then output the highest number so far and complete the process. o Otherwise, each successive number is read in, stored and compared. o The higher number is stored, and the process repeats (loops) until COB. 5. Consider the following LMC instructions found in the given locations in memory below. Complete the F/E cycle table indicating each step and the content of each register as they are performed for instruction 27 in the program. [30 marks] Address 26 27 50 51 F/E cycle Steps Instruction Code 550 151 550 126 PC MAR MDR IR A
4. Write a LMC program that begins by accepting an input number. With each input instance, the program keeps track of the highest number entered so far. The program should loop indeterminate number of times but from the second input onward if a 0 (zero) is input, the program outputs the current highest number and stop. [20 marks] Hints: O O O O It may be useful to review and modify Question #2 in the LMC-Challenge. Begin program sequence at location address 00. Indicate each address, mnemonic and numerical instruction. In the first iteration, if the second input number is 0, then output the highest number so far and complete the process. o Otherwise, each successive number is read in, stored and compared. o The higher number is stored, and the process repeats (loops) until COB. 5. Consider the following LMC instructions found in the given locations in memory below. Complete the F/E cycle table indicating each step and the content of each register as they are performed for instruction 27 in the program. [30 marks] Address 26 27 50 51 F/E cycle Steps Instruction Code 550 151 550 126 PC MAR MDR IR A
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 14E
Related questions
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 10 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,