Transcription of MIPS Instructions - George Mason University
{{id}} {{{paragraph}}}
1 1998 MorganKaufmannPublishersChapter 32 1998 MorganKaufmannPublishersMIPS Instructions InstructionMeaningadd $s1,$s2,$s3$s1 = $s2 + $s3sub $s1,$s2,$s3$s1 = $s2 $s3addi $s1,$s2,4$s1 = $s2 + 4ori $s1,$s2,4$s2 = $s2 | 4lw$s1,100($s2)$s1 = Memory[$s2+100] sw$s1,100($s2)Memory[$s2+100] = $s1bne$s4,$s5,LabelNext instr. is at Label if $s4 $s5beq$s4,$s5,LabelNext instr. is at Label if $s4 = $s5slt $t1,$s2,$s3 if $s2 < $s3, $t1 = 1 else $t1 = 0j LabelNext instr. is at Labeljr $s1 Next instr is in register $s1jal LabelJump and link procedure at Label3 1998 MorganKaufmannPublishers assembly provides convenient symbolic representation much easier than writing down numbers , destination first Machine language is the underlying reality , destination is no longer first assembly can provide'pseudoinstructions' , move $t0, $t1 exists only in assembly would be implemented using add $t0,$t1,$zero assembly language
Assembly Language vs. Machine Language 4 1998 Morgan Kaufmann Publishers • Instructions are bits • Programs are stored in memory — to be read or written just like data • Fetch & Execute Cycle – Instructions are fetched and put into a special register – Bits in the register "control" the subsequent actions
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}