A good answer might be:

li $t7,0xFF001234   ==   lui $t7,0xFF00
    ori $t7,$t7,0x1234

The immediate operand of the pseudoinstruction represents a negative integer (notice that the "sign bit" is set). You don't have to use hex with li. You could have written: li $t7,-16772555.

Example Program

Here is a tiny example program using load immediate. More practical examples follow in a few more pages.

## liEg.asm
##
        .text
        .globl  main

main:
        li    $t0,43        #  first  value
        li    $t1,-96       #  second value
        li    $t7,-16772555 #  third  value
        addu  $t0,$t0,$t1   #  add the values
        addu  $t0,$t0,$t7   #  leave result in $t0

## end of liEg.asm

Each of the li instructions translates into different basic instructions. To run the program in SPIM, first look in the settings menu. Put a check for "allow pseudo instructions" and remove the check from "bare machine".

QUESTION 11:

(Review: ) What is a symbolic address?