assign1.asm - Travis Cook EEE230 Assignment 1.data...

This preview shows page 1 out of 1 page.

# Travis Cook, EEE230 Assignment 1 .data val1: .word 1 val2: .word 2 val3: .word 3 .globl main .text main: lui $t3, 0x1001 #initializes the base address of the first word into $t3 addi $s0, $0, 4 #puts the value 4 into register $s0 addi $s1, $0, 16 #puts the value 16 into register $s1 addi $s2, $0, -3 #puts the value -3 into register $s2 sw $s1, 0($t3) #stores value in $s1 into the memory labeled val1 sw $s2, 4($t3) #stores the value in $s2 into the memory labeled val2 addi $t0, $s2, -4 #performs the operation $s2-4 and puts into $t0 sub $t1, $s0, $s1 #performs $s0-$s1 and puts the answer into $t1 add $t2, $t1, $t0 #performs $t1+$t0 and puts the reult into $t2

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture