Skip to content

Instantly share code, notes, and snippets.

@jpadilla
Created April 14, 2011 22:54
Show Gist options
  • Save jpadilla/920775 to your computer and use it in GitHub Desktop.
Save jpadilla/920775 to your computer and use it in GitHub Desktop.
##########################################################################
# Source file addNumbers.asm
# Description: This program puts the number 2 and 3 into registers
# $8 and $9. It adds these numbers and puts the result
# into register $10
##########################################################################
.text
.globl main
main:
ori $8,$0,0x2 # put two's comp. two into register 8
ori $9,$0,0x3 # put two's comp. three into register 9
addu $10,$8,$9 # add register 8 and 9, put result in 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment