This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Pseudo-instructions These are easy-to-use assembly language instructions that do not have a direct machine language equivalent. During assembly, the assembler translates each psedudo- instruction into one or more machine language instructions. Pseudo-instructions enrich the instruction set, and make programming easier. Example move $t0, $t1 # $t0 ! $t1 (pseudo-instruction) The assembler will translate it to add $t0, $zer0, $t1 Consider the new instruction slt $s1, $s2, $s3 (set less than) if $s2 < $s3 then set $s1 to 1 Now, there is a pseudo-instruction blt $s0, $s1, label The assembler translates this to slt $t0, $s0, $s1 # if $s0 < $s1 then $t0 =1 else $t0 = 0 bne $t0, $zero, label # if $t0 " 0 then goto label Loading a 32-bit constant into a register Quite often, we would like to load a constant value into a register (or a memory location) lui $s0, 42 # load upper-half immediate ori $s0, $s0, 18 # (one can also use andi) What is the end result? What is the end result?...
View Full Document
This note was uploaded on 02/18/2011 for the course 22C 060 taught by Professor Ghosh during the Spring '11 term at University of Iowa.
- Spring '11