title: MIPS Assembly Language Programming
author: Robert Britton Professor Emeritus
description: <P> <I>First impressions are important.</I> </P> <P> To introduce your Assembly Language programming students to the fundamental concepts of contemporary computer architecture, start with a Reduced Instruction Set Computer (RISC). </P> <P> When students first encounter computer architecture, they need to begin with the basics of modern computer organization. The MIPS architecture embodies the fundamental design principles of all contemporary RISC architectures: </P> <UL> <LI>All instructions are directly executed in hardware</LI> <LI>The rate at which instructions are issued is maximized</LI> <LI>Instructions are easy to decode</LI> <LI>Only load and store instructions reference memory</LI> <LI>Plenty of general purpose registers are provided (32 for MIPS)</LI> </UL> <P> <B>MIPS Assembly Language Programming</B> offers students an understanding of how the functional components of modern computers are put together and how a computer works at the machine-language level. The book begins with a datapath diagram that shows a simple implementation of the MIPS architecture, consisting of a register file, an ALU, a memory. a program counter, and an instruction register. As students progress through the text, they will elaborate on this established datapath diagram model, allowing them to visualize how the instructions are fetched and executed as they write their programs. </P> <P> The Spim simulator for the MIPS architecture runs on PC's and Unix<SUP>&#174;</SUP> systems. All the programming exercises are done using this simulator, which can be downloaded for free from the Internet. Using the MIPS simulator allows students to observe the contents of the registers and memory change as their programs execute. The students are not isolated by a particular operating system from experiencing and writing code dealing with: </P> <UL> <LI>Memory-mapped I/0</LI> <LI>Interrupts and exception processing</LI> <LI>Delayed loads and delayed branches for a pipelined implementation</LI> </UL> <P> It is assumed that students using this text already have some experience in developing algorithms, and running programs in a high-level language. The skills they will learn with <B>MIPS Assembly Language Programming</B> offer a sound basis for advanced work in computer architectures and complex assembly languages. </P>
zlib_text: Gettysburg College Open Educational Resources
  2015
  Introduction To MIPS Assembly Language
  Programming
  Charles W. Kann
  Gettysburg College
  Follow this and additional works at: https://cupola.gettysburg.edu/oer
  Part of the Computer and Systems Architecture Commons, and the Systems Architecture
  Commons
  Share feedback about the accessibility of this item.
  This open access book is brought to you by The Cupola: Scholarship at Gettysburg College. It has been accepted for inclusion by an
  authorized administrator of The Cupola. For more information, please contact cupola@gettysburg.edu.
  Kann, Charles W., "Introduction To MIPS Assembly Language Programming" (2015). Gettysburg College Open Educational Resources.
  2.
  https://cupola.gettysburg.edu/oer/2
  
  Introduction To MIPS Assembly Language Programming
  Description
  This book was written to introduce students to assembly language programming in MIPS. As with all assembly
  language programming texts, it covers basic operators and instructions, subprogr