??? 01/10/08 21:48 Read: times |
#149284 - I'm happy now Responding to: ???'s previous message |
Erik said:
it seems Bill and Brett agree. I think we can consider this a sleeping dog and let it lie.
What seems to be "the error" in "the bible" is that resulting from the earlier addition must be taken literaly. I.e. the flags and ACC must be at a state which is a possible result of an addition of two BCD values. I think I agree. If you interpret it that way (and pay attention to the comment in parentheses that Brett pointed out), everything makes sense. In fact, near the end of the instruction description, there's one more hint in the "operation" section where it says "contents of Accumulator are BCD". Even that's a little cryptic, since the contents of the Accumulator aren't really in BCD at that point (that's what the instruction is trying to adjust, after all), but I think it's trying to say the same thing. With all the confusion etc resulting from this I really wonder how some of the "'51 cores" behave :) Indeed. I'd be willing to bet that they're not all the same. I think I'm going to implement mine without considering the weakly stated restriction on the input conditions. Then I'll test the crap out of it to make sure it does work properly for the allowed inputs. Thanks to everyone for thinking about this. -- Russ |