"Chuck Guzis" <cclist at sydex.com> wrote:
On 23 Jun 2007 at 0:40, Sridhar Ayengar wrote:
How does one implement a 1-bit program counter?
Seems to me being able
to distinguish between two program instructions doesn't seem *all* that
useful. 8-)
The program counter (like memory and its addressing as well as
registers to hold a jump target) was to be provided externally.
Some of the more clever designs avoided a program counter by having
the program cycle around sequentially and repeatedly. Why put the
concept of a PC into the engine if the engine doesn't need the concept
of a PC?
And the most clever designs avoided jump targets too by never having
the program take a branch. They would use the conditional-skip
codes to skip the instructions they didn't want, in the never ending
repeating instruction stream.
For industrial controllers, the above is really a very good match.
If you want to be really really sure you can't smash the stack or
start executing data, not only not having a stack but not having a
PC in the traditional sense was a huge advantage.
Now the minimalist industrial-controller mindset is not out there
very much today. Everyone carries around ipods and cellphones and all sorts
of junk sold by having a bazillion features and submenus.
Tim.