Discussion:
Lab 1 Output discrepancy
(too old to reply)
Grant
2005-10-25 03:19:05 UTC
Permalink
My output for Lab 1 matches the sample shown in the handout except for the
ACC in the last 2 steps. For PC=0x5, I get ACC=0xFFFFFF03. For PC=0x6,
ACC=0xFFFFFD09. I'm not sure if something is wrong with my program, or if it
is some quirk with the ISEM. Is anyone else having this problem?

Grant
B A Bair
2005-10-25 13:51:56 UTC
Permalink
Hi Grant ;

If you did not follow the helpful advice in step 12 of the lab1 guidelines
(online at http://www.cse.ohio-state.edu/~heym/360/common/now/lab1.html),
you may have stored an invalid result at m[15]. Consequently when you
attempt to SUB15, you are using incorrect values and will probably get
incorrect results.

I hope that hint helps.

:-)
Bettina
Post by Grant
My output for Lab 1 matches the sample shown in the handout except for the
ACC in the last 2 steps. For PC=0x5, I get ACC=0xFFFFFF03. For PC=0x6,
ACC=0xFFFFFD09. I'm not sure if something is wrong with my program, or if
it is some quirk with the ISEM. Is anyone else having this problem?
Grant
Grant
2005-10-25 22:28:50 UTC
Permalink
(Just a note: guideline 12 in the handout is not the same as the one listed
on the webpage.)

My value at m[15] matches what's shown in the handout. To clarify: after I
run my program, all of the relevant register and memory locations have the
same value as what is shown in the handout, except of course for register 3
(the ACC,) which shows the output I mentioned in my first post: FFFFFD09

However, I've figured out the problem. It had nothing to do with sdiv. I was
using ldub (load unsigned byte) where I should have been using ldsb (load
SIGNED byte.)

Thanks for your help.

Grant

Loading...