Brandon
2005-11-08 19:43:34 UTC
The way I implemented opcodes was to mov the value from the MDR to the IR.
Then, I used a srl %r4, 5, %r4 to ensure that only the opcode was in the IR.
The addr can still be obtained from the MDR since that value has not yet
been changed. This works perfectly for executing my program, but in
comparing my register values to those that "should" be there, I see it shows
the IR as still holding the entire instruction, instead of just the opcode.
Is there anything wrong with my implementation (will points be taken off?),
and if so, where should I store the opcode while comparing it to the various
recognized SAM opcodes?
Then, I used a srl %r4, 5, %r4 to ensure that only the opcode was in the IR.
The addr can still be obtained from the MDR since that value has not yet
been changed. This works perfectly for executing my program, but in
comparing my register values to those that "should" be there, I see it shows
the IR as still holding the entire instruction, instead of just the opcode.
Is there anything wrong with my implementation (will points be taken off?),
and if so, where should I store the opcode while comparing it to the various
recognized SAM opcodes?