{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

report4 - performed on the them After the mathematical...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Abstract The object of this lab was to understand the functionality of the trap #15 command as well as to develop an efficient understanding of how to write sub-routines, and use I/O devices. This is done through using subroutines that contains traps to ready input in from the output devices and to print out the results of the operation as defined in the lab. Procedure The first step was to set up constants for X and Y so that the mathematical operations would work. The mathematical operations would be done through moves, shifts and adds much like in the labs that preceded them. The major difference in this lab was that there was a prompt that asked the user for input for the values being computed in the lab. To prompt the user the program would have to use a trap 15, using the number that corresponds to the printing of a string as listed on the trap 15 chart for this given simulator. Once the numbers are read in they need to be transferred from the register they’re in into the variable that represents each so that the mathematical operations can be
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: performed on the them. After the mathematical operations have been performed a various sequence of branches must be used to get to the different sub routines to print the number. The first branch braches if the result is positive, the second if it is negative and the third if it is zero. They branch to the respective subroutines which essentially do the same thing except tell if the number is positive, negative or zero. All of these subroutines branch to a final sub routine which uses a trap to prompt the user to see if they would like to continue and do another calculation. Conclusion This lab was effective at showing the trap and subroutine concepts purely because the lab is not possible without them. The program cannot print out the result without a subroutine. Nor can this program print, and/or read in numbers without the trap 15 function. Thus this lab is effective at getting the concepts across because without them it is impossible to do....
View Full Document

{[ snackBarMessage ]}

Page1 / 2

report4 - performed on the them After the mathematical...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online