1. T F In the LC-3, the user program invokes the OS to perform an I/O operation
ID: 3836389 • Letter: 1
Question
1. T F In the LC-3, the user program invokes the OS to perform an I/O operation using the TRAP command.
2. T F The System Control Block or the Trap Vector Table is a set of memory locations which contain the starting addresses of the service routines.
3. T F In the LC-3, the operating system uses the RET instruction to return control to the user program.
4. The execution of the JSR instruction at location x4202, causes R7 to be loaded with:
a. x4200
b. x4201
c. x4202
d. x4203
5. If R3 contains x5000 and the JSRR instruction is stored in x4000, the value of the PC after execution of JSRR R3 is:
a. x4000
b. the contents of memory location x5000
c. x5000
d. the contents of memory location x4000
6. . In a JSR instruction, what is the maximum offset you can jump to from the JSR instruction location:
a. 511 words
b. 1023 words
c. 255 words
d. 63 words
7. A subroutine must end with the _________ instruction.
8. If a subroutine needs to call another subroutine, it needs to save _____ before making that call.
Explanation / Answer
1. Generally User program invokes system call. Operating system code performs operation and Returns control to user program.
In LC-3, this is done through the TRAP mechanism.
Ans: True.
2. Ans:True.
The System Control Block or the Trap Vector Table is a set of memory locations which contain the starting addresses of the service routines
3. ANS: True.
RET gets us back to the user program at the right spot.
4. Ans: The execution of the JSR instruction at location x4202, causes R7 to be loaded with x4201.
Ans: b. x4201
5. If R3 contains x5000 and the JSRR instruction is stored in x4000, the value of the PC after execution of JSRR R3 is x5000.
Ans: c. x5000
6. In a JSR instruction maximum offset you can jump to from the JSR instruction location is 511 words.
a. 511 words
7. END SUBROUTINE, followed by its name.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.