Journal: Assembly Language
Due at 10:30pm the night before Monday, September 28, 2015

The reading for today introduces instructions in the MIPS architecture. These are considerably lower-level than most things you have seen in Scheme, C, or Java. Finding connections between these low-level operations and familiar programming concepts will help you understand assembly.

For each of the following assembly operations, write an expression in a higher-level language that performs the same operation as that instruction. You are free to choose which variables correspond to which registers in assembly, but please explain how they match up.

  1. add $s1, $s2, $s3
  2. sub $s1, $s2, $s3
  3. addi $s1, $s2, 100
  4. lw $s1, 100($s2)
  5. sw $s1, 100($s2)