# This program loops, putting powers of two into $1 at the end of each # iteration. addiu $1, $0, 1 # put 1 into register 1 # start of loop # (copy current PC into register 31 so we can jr $31 later to loop) addiu $31, $0, PC addu $2, $1, $0 # copy register 1 into register 2 j skip # stuff between here and skip should never be executed or $4, $3, $2 xori $5, $4, 6 skip: addu $1, $2, $2 # register 1 gets double the value of register 2 jr $31 # begin next iteration of loop