A1_3 - # put 2 into $10 # mult $10, $8 # lo <--...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
## A1_3.asm ## Written by: Colin Swelin 0308676 ## Program to calculate z = 3x2 + 7x - 10 ## .text .globl main . main: m ori $8, $0, 2 # put x into $8 ori $9, $0, 7 # put 7 into $9 mult $9, $8 # lo <-- 2x mflo $9 # $9 = 7x addiu $9, $9, -10 # $9 = 7x - 10 # ori $10, $0, 2
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: # put 2 into $10 # mult $10, $8 # lo &lt;-- 2x mflo $10 # $10 &lt;-- quotient # ori $11, $0, 3 # put 3 into $11 # mult $11, $10 # lo &lt;-- 3x mflo $11 # $11 &lt;-- quotient # addu $11, $11, $9 # 3(4) + 4 # ## end of file...
View Full Document

Ask a homework question - tutors are online