Created 06/16/03

# on Running SPIM

This is a practice quiz. The results are not recorded anywhere and do not affect your grade. The questions on this quiz might not appear in any quiz or test that does count toward your grade.

Instructions: For each question, choose the single best answer. Make your choice by clicking on its button. You can change your answers at any time. When the quiz is graded, the correct answers will appear in the box after each question.

1. What is a source file?

A. ... a text file that contains statements of programming language.
B. ... a subdirectory that contains programs.
C. ... a file that contains data for a program.
D. ... a document that contains the requirements for a project.

2. What is a register?

A. ... a part of the computer system that keeps track of system parameters.
B. ... a part of the processor that holds a bit pattern.
C. ... a part of the processor that contains its unique serial number.
D. ... the part of the system bus that contains data.

3. What character, in SPIM assembly language, starts a comment?

A. #
B. $
C. //
D. *

4. How many bits are there in each MIPS machine instruction?

A. 8
B. 16
C. 32
D. Different instructions are diferent lengths.

5. When you open a source file from the File menu of SPIM, what two things happen?

A. The file is loaded into memory and execution starts.
B. SPIM is booted and the file is opened in the editor.
C. The file is assembled into machine instructions, and the machine instructions are loaded into SPIM's memory.
D. The program is run and the results are saved to disk.

6. What is the program counter?

A. ... a register that keeps counts the number of errors during execution of a program.
B. ... a part of the processor that contains the address of the first word of data.
C. ... a variable in the assembler that numbers the lines of the source file.
D. ... a part of the processor that contains the address of the current machine instruction.

7. Say that you push F10 to execute one instruction. What amount is added to the program counter?

A. 1
B. 2
C. 4
D. 8

8. What is a directive, such as the directive .text?

A. ... an assembly language statement that results in one machine language instruction.
B. ... one of the menu choices in the SPIM menu system.
C. ... a machine language instruction that causes an operation on data.
D. ... a statement that tells the assembler something about what the programmer wants, but does not itself result in any machine instructions.

9. What is a symbolic address?

A. ... a location in memory containing symbolic data.
B. ... a byte in memory that holds the address of data.
C. ... the symbol given as the argument for a directive.
D. ... a name used in source code for a location in memory.

10. At what address does the SPIM simulator put the first machine instruction when it is running with the Bare Machine option turned ON?

A. 0x00000000
B. 0x00400000
C. 0x10000000
D. 0xFFFFFFFF

The number you got right: Percent Correct: Letter Grade:

If you have returned here from another page, or have re-loaded this page, you will need to click again on each of your choices for the grading program to work correctly. You may want to press the SHIFT KEY while clicking to clear the old answers.