Lecture 7:MIPS Assembly Language and SPIM
Date: Apr. 24
Background Material and Further Resources
- Review C programming language as necessary (recursive functions,
arrays, strings, pointers)
- Review material in chapter 3 sections 1 - 6
Reading
- Sections 3.7 - 3.8, 3.9 (pp. 157-158) and 3.10 - 3.11.
- Appendix A (sections A.1-2, A.9-10)
Topics
- Introducition to MIPS assembly language and the SPIM simulator.
- Arrays and Strings (sec. 3.7)
- Addressing Modes
- Register Addressing
- Base or Displacement Addressing
- Immediate Addressing
- PC-relative Addressing
- Pseudodirect Addressing
- Some immediate instructions (addi, subi, slti, lui)
- Some pseudo-instructions
- blt and other conditional branches (use slt and bne)
- move (use add with $zero)
- Some other things the assembler can do
- loading a 32 bit constant (lui and addi)
- branching far away (beq $s0, $s1, L1 => bne and j)
- Decoding Machine Language
Programs
Assignment
Created: Apr. 24, 2000 by
jjohnson@mcs.drexel.edu