{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIPS ASSEMBLY LANGUAGE

# MIPS ASSEMBLY LANGUAGE - Srl \$1,\$2,5 \$1 = \$2>> 5 Load...

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

MIPS ASSEMBLY LANGUAGE Instruction Example Meaning Add Add \$1,\$2,\$3 \$1 = \$2 + \$3 Subtract Sub \$1,\$2,\$3 \$1 = \$2 - \$3 Add immediate Addi \$1,\$2,100 \$1 = \$2 + 100 Add unsigned Addu \$1,\$2,\$3 \$1 = \$2 + \$3 Subtract unsigned Subu \$1,\$2,\$3 \$1 = \$2 - \$3 Add immediate unsigned Addiu \$1,\$2,100 \$1 = \$2 + 100 Move from coproc. Register mfc0 \$1,\$epc \$1 = \$epc Multiply mult \$2,\$3 Hi, lo = \$2 * \$3 Multiply unsigned Multu \$2,\$3 Hi, lo = \$2 * \$3 Divide Div \$2,\$3 Lo = \$2 / \$3; hi \$2 mod \$3 Divide unsigned Divu \$2,\$3 Lo = \$2 / \$3; hi \$2 mod \$3 Move from Hi Mfhi \$1 \$1 = Hi Move from Lo Mflo \$1 \$1 = Lo And And \$1,\$2,\$3 Or Or \$1,\$2,\$3 \$1 = \$2 | \$3 And immediate Andi \$1,\$2,100 Or immediate Ori \$1,\$2,100 \$1 = \$2 | 100 Shift left logical Sll \$1,\$2,5 \$1 = \$2 << 5 Shift right logical
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Srl \$1,\$2,5 \$1 = \$2 >> 5 Load word Lw \$1,100(\$2) \$1 = memory [\$2 + 100] Store word Sw \$1, 100(\$2) memory [\$2 + 100] = \$1 Load upper immediate Lui \$1,100 \$1 = 100 x 2 16 Branch if equal Beq \$1,\$2,100 if (\$1 = \$2), PC = PC + 4 + 100 Branch if not equal Bne \$1,\$2,100 if (\$1 ≠ \$2), PC = PC + 4 + 100 Set if less than Slt \$1,\$2,\$3 if (\$2 < \$3), \$1 = 1 else \$1 = 0 Set if less than immediate Slti \$1,\$2,100 if (\$2 < 100), \$1= 1 else \$1 = 0 Set if less than unsigned Sltu \$1,\$2,\$3 if (\$2 < \$3), \$1 = 1 else \$1 = 0 Set if less than imm.uns. Sltiu \$1,\$2,100 if (\$2 < 100), \$1 = 1 else \$1 = 0 Jump J 10000 PC = 10000 Jump register Jr \$31 PC = \$31 Jump and link Jal 10000 \$31 = PC + 4; PC = 10000...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online