Chapter 5. The MIPS Architecture

Table of Contents

5.1. Motivation
5.1.1. Why Learn Assembly Language?
5.1.2. What is Computer Architecture?
5.2. Hardware and Program Execution
5.2.1. Memory
5.2.2. Data Registers
5.2.3. The Program Counter (PC)
5.2.4. The Instruction Register (IR)
5.2.5. The Control Unit (CU)
5.2.6. The Arithmetic and Logic Unit (ALU)
5.3. The MIPS Register Files
5.4. MAL: MIPS Assembly Language
5.4.1. A Simple Example Program
5.4.2. Memory Segments
5.4.3. MAL Instruction Format
5.4.4. Comments
5.4.5. Labels
5.4.6. Directives
5.4.7. Constants
5.4.8. Instructions
5.4.9. Input/Output: System Calls
5.4.10. A Complete Example Program
5.4.11. Addressing Modes
5.5. Architecture Classifications
5.5.1. Classification by Instruction Operands
5.5.2. Classification by Memory Structure
5.5.3. Classification by Complexity
5.6. The Instruction Cycle
5.6.1. Generic CPU Instruction Cycle
5.6.2. MIPS Instruction Cycle
5.6.3. Analysis of the Instruction Cycle
5.7. MIPS Instruction Code Formats
5.7.1. Register Instructions
5.7.2. Jump
5.7.3. Coprocessor Instructions
5.7.4. Immediate
5.8. Homework

Assigned reading: Britton chapter 1.

5.1. Motivation

5.1.1. Why Learn Assembly Language?

  • AL programming teaches you to write more efficient HLL code through a better understanding of what comes out of a compiler.
  • Lead into the rapidly growing field of embedded programming and robotics.

    Who has a robot at home? ( Think hard )

  • In rare cases, programmers may choose to maximize the speed of parts of a program by hand-optimizing assembly language. Modern compilers include object code (machine code) optimizers that do a very good job of optimizing compiler output. However, a good programmer can often do better with a bit of effort.

5.1.2. What is Computer Architecture?

Architecture: Defined by the instruction set. Examples: MIPS, x86 family, 68k family, ARM, PowerPC, VAX, etc.

MIPS - Microprocessor without Interlocking Pipeline Stages.

MIPS processor: Originally used in Unix workstations, now mainly used in small devices. ( Play Station, routers, printers, robots, cameras )