Skip to main content
Engineering LibreTexts

2: First Programs in MIPS Assembly

  • Page ID
    27098
  • Learning Objectives

    1. to download, install, and run the MARS IDE.
    2. what are registers, and how are they used in the CPU.
    3. register conventions for MIPS.
    4. how memory is configured for MIPS.
    5. to assemble and run a program in MARS.
    6. the syscall instruction, and how to pass parameters to syscall.
    7. what immediate values are in assembly language.
    8. assembler directives, operators, and instructions.
    9. to input and output integer and string data in MIPS assembly.

    This chapter will cover first program that is often implemented when writing in a new language, a Hello World program. This program is significant in any language because it covers the most fundamental concepts any program can achieve, creating an executing program that can read data in and print results out. Creating an executing program is important because it covers an Integrated Development Environment (IDE) which will allow the programmer to edit the program and to create resultant execution of that program. Being able to input data and output results covers a basic understanding of registers, I/O mechanisms, and provides a mechanism to test algorithms by allowing users to enter data and see if the result is what is expected.

    This first program is particularly important because the concepts of statements and variables require a much more in depth knowledge of the language and platform. This chapter is intended to prepare the reader for the rigors of programming MIPS assembly by leading the reader step- by-step into a first working program.

    • Was this article helpful?