>> For the first answer i guess , code #1 is true..
OR-ing the values together is the standard approach. The ori instruction zero-extends the immediate value, so (1) should indeed work without issues.
>> but i am confused abt the other 2
For the other two, there are two extra factors to take into account. Both the addi and addiu instructions sign-extend the immediate value. On top of that, the addi instruction can generate an overflow exception.
Main Topics
Browse All Topics





by: Kaustubh77Posted on 2009-09-21 at 16:38:47ID: 25388675
For the first answer i guess , code #1 is true.. but i am confused abt the other 2