C SC 160 Chapter 3: Numerical Data
major resource: An Introduction to Object-Oriented Programming with Java, fourth
edition,
Wu, McGraw Hill, 2006
[ previous | schedule | next ]
# MIPS assembly program to add two integers # Pete Sanderson # .data first: .word 13 second: .word 25 result: .word 0 .text lw $t0, first # load value from memory into register $t0 lw $t1, second # load value from memory into register $t1 add $t2, $t0, $t1 # add $t0 value to $t1 value, result into register $t2 sw $t2, result # store value from register $t2 into memory |