Post by Frank Buss Post by Peter Hendriks
Peter http://home.planet.nl/~p.j.hendriks/ppvdw.htm + Union Jack
What means "the outshifted bit is temporarily placed in the Carry (X)" for
the shifting commands? How long means "temporarily"? I assume until the
next shift or the next jump command and the other commands doesn't change
Does this have any bearing on the size of the smallest program? Only if
it does, do you have a genuine objection. (Note that this type of
ambiguity is one that crops up in most real processors, and can often be
used to detect which version of silicon a program is running on.)
I would admit, if "temporarily" were to mean that the value could not be
relied on to be there for the immediately following instruction, there
could be a bit of a problem. The example, by being stated as a valid,
functional program, which does its job as specified, clears up this
Post by Frank Buss
Another problem is the bit size of A, B and C. The example didn't worked
with my Common Lisp implementation of ESIC (see
http://www.frank-buss.de/tmp/esic.lisp.txt ), because I have unlimited big
integer numbers (but replacing the last SAL by SAR fixed it).
I think this is covered by the phrase "in size large enough for the
purpose of this puzzle". In fact, what you say is wrong anyway! The
example DID "work". Your choice of implementation merely meant that you
would take an infinite amount of time and memory, during the
initialisation of the random values in the registers, before getting on
to performing even the clearing of the C register. Obviously, an
infinite size for the registers is not suitable "for the purpose of this
Also, as above, the example must be taken as gospel.
Come to think of it, on S?L instructions, which bit did your
implementation take to be the bit being shifted out?
Post by Frank Buss
The last problem is the initial state of the carry flag after BEG. I assume
it is cleared.
Again, if this affects the solution, you have a point. If not, then it
is not a problem. Assuming that it is cleared is probably the least
likely case. RAM has a habit of being set (with a probabilistic tinge),
rather than cleared.