Question: 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

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!