go to previous page   go to home page   go to next page hear noise

Answer:

No. Operand registers are not changed, unless one is also the destination register.


Run of the Program

Here is a run of the program. The results are as expected. The source code is shown at the right of the text section. In the middle column of the text section the decimal equivalents of the immediate operands is shown in the instructions.

Run of the Program

To express an immediate operand using decimal notation omit the leading "0x".

        ori      $8, $0, 171       # put 171 into $8
        ori      $9, $0,  85       # put  85 into $9
        addu     $10,$9,  $8       # $10 <—— sum

Of course, the immediate operand in the machine instruction is a 16-bit pattern. The assembler allows you to specify this pattern using the hexadecimal pattern name, or a decimal integer that is converted into a 16 bit pattern.


QUESTION 6:

(Review:) Can a negative const be used with the instruction:

ori  $d,$0,const