; ### -------------------------------------------------------------- ### ; # file : lhi000.u # ; # date : Mar 30 1993 # ; # descr. : functional test for mips # ; ### -------------------------------------------------------------- ### ; ### ------------------------------------------------------ ### ; # lhi # ; ### ------------------------------------------------------ ### .org 0x00400000 const .equ 0x1234 .start init init: lui r1 , const ; load high a constant into r1 addiu r2 , r0 , const ; load the same value into r2 sll r2 , r2 , 16 ; beq r2, r1, good nop j bad nop .org 0x004000d0 good: j good nop bad: j bad nop .end