Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Lab #4 SC: Subroutine CS 1A 30 pts Name Name: Class Day /Time: Due Date Lab #4-SC. Subroutine Below is a flowchart for a subroutine

image text in transcribed
image text in transcribed
Lab #4 SC: Subroutine CS 1A 30 pts Name Name: Class Day /Time: Due Date Lab #4-SC. Subroutine Below is a flowchart for a subroutine that will input one number from the input cards and check that the number is greater than or equal to 100. If the number is in the correct range (i.e. > 100) that number will be returned to the main program in the accumulator. If the number is not in the correct range, the subroutine will return a negative number in the accumulator Write the Simple Computer instructions for this subroutine beside the flowchart. Group the instructions beside the appropriate flowchart symbol. Any data used by the subroutine should follow the subroutine in memory Note that the subroutine instructions that set up the return address are not represented by symbols in the flowchart. They should be written at the beginning of the subroutine. Perform a desk check, and make sure your logic works properly. 1 of 2 Lab #4 SC: Subroutine CS 1A x: cell #? Data: 100: Cell #? 600: cell #? Checkinput Input 100 Return X Return a negative 2 of 2 Lab #4 SC: Subroutine CS 1A 30 pts Name Name: Class Day /Time: Due Date Lab #4-SC. Subroutine Below is a flowchart for a subroutine that will input one number from the input cards and check that the number is greater than or equal to 100. If the number is in the correct range (i.e. > 100) that number will be returned to the main program in the accumulator. If the number is not in the correct range, the subroutine will return a negative number in the accumulator Write the Simple Computer instructions for this subroutine beside the flowchart. Group the instructions beside the appropriate flowchart symbol. Any data used by the subroutine should follow the subroutine in memory Note that the subroutine instructions that set up the return address are not represented by symbols in the flowchart. They should be written at the beginning of the subroutine. Perform a desk check, and make sure your logic works properly. 1 of 2 Lab #4 SC: Subroutine CS 1A x: cell #? Data: 100: Cell #? 600: cell #? Checkinput Input 100 Return X Return a negative 2 of 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students explore these related Databases questions

Question

2. What are the different types of networks?

Answered: 3 weeks ago