View Single Post
Old 1st September 2008, 23:30   #36  |  Link
Oopho2ei
Guest
 
Posts: n/a
Quote:
Originally Posted by evdberg View Post
Should JAL #PC+3FFF8EC not be JAL #PC-714 ? Considering the immediate value is 26 bits, and offsets are usually signed? And considering the address space is only 4MB (22 bits PC).
You are right (again ). I just tried to uniformly represent the immediate part as unsigned value. You would get the same result after the addition and & 0x3FFFFC. Before any memory access you need to calculate "address = address & 0x3FFFFC" anyway. (Except if you want to access 16 bit or 8 bit values then of course you wouldn't mask the least significant 2 bits). But it is much easier to read so i corrected it. I didn't record the program counter otherwise i would have just replaced #PC-714h with the result.

Last edited by Oopho2ei; 1st September 2008 at 23:56.
  Reply With Quote