Re: [stack] Concatenative Hardware Redux (Another 16 Instruction Set)

"Christopher Diggins" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Jan 11, 2008 11:35 AM, William Tanksley, Jr <[email protected]> wrote:
> A fascinating goal, and one which to my knowledge has not been
> attempted together with a high-level instruction set.

I think the distinction between "high-level" and "low-level" is
artificial, and rooted to firmly on the naivete of our predecessors.
If we ignore it, we can come up with something new and interesting.

> > However, to be completely honest, the more I experiment with the
> > instruction set, the more I think that I would prefer to work with a
> > 255-instruction set (ala JVML).
>
> Completely incompatible with the goal of minimal hardware

Not at all, it depends on what you do with these instructions. I
should clarify that I really mean "1-byte" operators. The core
instructions would be few, and many of the bits would be flags.
Consider:

dup
pop
swap
...

and then with a bit flag to represent "dip"

dupd == [dup] dip
popd == [dup] dip
swap == [swap] dip
...

and another bit flag to represent "dup"

ddup = dup dup
dpop = dup pop
dswap = dup swap
...

and another bit flag to represent "swap"

swdup = swap dup
swpop = swap pop
...

Hopefully this illustrates what I have in mind.

> -- and do
> you actually have anything close to 256 opcodes?

It's quite easy to come up with a whole bunch of opcodes.

> Can you imagine
> building all the hardware to support each one and muxing/demuxing them
> together?

Well yes. I don't think it neccessarily has to be complex.

> Wouldn't retreating to 5-bit instructions make more sense
> initially?

The simplicity of the design has less to do with the number of
instructions, than it does with the organization and kind of
instructions. 4-bit instructions is an interesting challenge, because
it is so darn small. 5-bit instructions has already been done and I
believe would be hard to port to other architectures efficiently.
8-bit instructions is easy to port and emulate. I consider emulation
very important, because a practical virtual machine would be run on
many different kinds of chips and software.

- Christopher
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.