MIPS

My first steps in MIPS assembly during IC1, from scratch: every topic with its theory, commented programs and exercises, tested in QtSpim or in the site’s MIPS playground. If you come from Python or C, here you’ll see what the processor really does with your code.

19 articles

  1. Data segment

    Directives, alignment, little endian and la vs lw

    Practice quiz
  2. Arithmetic and logic instructions

    Loads and stores, hi and lo, masks and shifts

    Practice quiz
  3. Branches and loops

    beq/bne, slt, if-else, and/or conditions and loops

    Practice quiz
  4. Arrays and strings

    .byte/.half, indexing with sll, strings and '\0'

    Practice quiz
  5. Console input and output

    syscall, read_int, read_string and the extra \n

    Practice quiz
  6. Subroutines and the stack

    jal and jr $ra, $t vs $s, the stack and recursion

    Practice quiz

Exams and mock exams