home .. forth .. misc mail list archive ..

how does + work (MuP21)?


Jeff has given me the impression (I may have misinterpretted) that if
you have a large number on the stack (such that the carry ripple time
is a full 3 instructions) and you have the following instruction word:
	+ 2/ COM NOP
that you will get what you would expect (i.e., if you start with 1FFFFF
and 000001, you would have 1FFFFF when you are done).  Leading me to
believe that he is indeed correct when he says that I am misunderstanding
something core about how the P21 works.

Jeff's explained that it computes every answer at the beginning of each
instruction...so I assume that by the beginning of the 2/ instruction, T
will hold 1FFF00 or similar (i.e., carry has propagated just 8 bits),
but then what is used to compute the potential answers?  It seems to me
if 2/ were just executed that it would throw off the carry propagating.
I could imagine a series of pretty clever hacks to make arithmatic (as
opposed to flow control) instructions not interfere with the propagating
carry.  Is this what happens?  What about for C=0?  Since this
instruction can only occur in slot 1 or 2...in slot 1, I guess
propagation doesn't matter (it's already done during the fetch time?),
then in slot 2 does it not actually check the carry bit until it is
time to execute the slot 4 instruction?  Are + and +* the only
instructions that you can't use naively while carry is propagating?
(Am I misunderstanding something altogether?)

Any help with this issue (from anyone) would be appreciated.