Test 2 will be Tuesday, Nov. 15. It will be closed book and notes, except for one 8.5" x 11" sheet of paper (front and back) with notes, and your green hand-out of MIPS assembly language instructions.

Chapter 2. MIPS Assembly Language

MIPS Processor Architecture: registers, register conventions, addressing modes, memory layout

MIPS Instruction Set: three ML instruction formats, loads/stores, arithmetic instructions, logical instructions, shift/rotate instructions, branch/jump instructions

SPIM System Calls: Section A.9 on CD with text

SPIM Assembler Directives: .data, .text, .word, .asciiz, .ascii, .GLOBL, .align

Arrays: element addressing both 1-d and 2-d

Walking pointer (section 2.15 called "Arrays versus Pointers")

Subprograms: MIPS Register conventions

Section 2.10 Translating and Starting a Program

Section 2.11 How Compilers Optimize

In addition to knowledge about the above concepts, the following assembly-language programming skills are to be tested too:

1) translate high-level language control statements (while, for, if, etc.) into MIPS assembly language (be able to handle complex Boolean expressions involving ANDs, ORs, etc.)

2) translate high-level language code containing array accesses into MIPS assembly language

3) use MIPS register conventions to decide which arguments/parameters and local variables should be stored in caller-saved ($a and $t-registers) or callee-saved ($s-registers)

4) translate high-level language subprograms into MIPS assembly language (passing parameters into the subprogram using the $a registers, building the call frame on the run-time stack if necessary, save $s and $ra registers if necessary, passing the value returned by a function in the $v0 register, restoring $s and $ra registers if necessary, jr back to the caller)

Chapter 3.

Section 3.4: Multiplication of unsigned and signed integers

Booth's Algorithm Example - see CD material "Chapter 3" | "In More Depth" | 3.23 Booth's Alg