joshua edward kossoff
2005-05-26 02:55:42 UTC
I think I'm having trouble reading from memory in the "memory" subroutine.
My parameters are %r8 for data, %r9 for kind and %r10 for addr.
As a method to trace my program, I set r8 to FFFFFFFF before I call
memory. Directly after I supposedly access the memory with the
instruction ldub [%r7 + %r10], %r8, I printinthex but the value is
always 0x0. I know there is no problem writing to memory because
dumping looks correct.
MEM was set to %r7 earlier in the program. I have tried changing the
instruction to the following:
1)
ldub MEM + %r10, %r8
2)
set MEM, %r1
add %r1, %r10, %r1
ldub [%r1], %r8
3)
set MEM, %r1
ldub [%r1 + %r10], %r8
4)
ldub [MEM + %r10], %r8
None of these have fixed my problem. Any suggestions?
Thank you,
Joshua Kossoff
My parameters are %r8 for data, %r9 for kind and %r10 for addr.
As a method to trace my program, I set r8 to FFFFFFFF before I call
memory. Directly after I supposedly access the memory with the
instruction ldub [%r7 + %r10], %r8, I printinthex but the value is
always 0x0. I know there is no problem writing to memory because
dumping looks correct.
MEM was set to %r7 earlier in the program. I have tried changing the
instruction to the following:
1)
ldub MEM + %r10, %r8
2)
set MEM, %r1
add %r1, %r10, %r1
ldub [%r1], %r8
3)
set MEM, %r1
ldub [%r1 + %r10], %r8
4)
ldub [MEM + %r10], %r8
None of these have fixed my problem. Any suggestions?
Thank you,
Joshua Kossoff