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

<, > etc. for NanoForth



Myron wrote:
 
> nanoFORTH is a core set of 15 stack instructions. The 16th instruction
> needs to be nop for instruction alignment ...

Stas wrote:

> Have you tried to write any simple program with your command set?
> I think that it is impossible.
> How are you going to realize next words with your 15 commands?
> >  <  >=  <=

Stas, I disagree that it is impossible. Remember the Register Machine
Model from 1936 or so. All problems that can be calculated are
programmable with:

   Register_i 1+ ,
   Register_i 1- and
   a conditional jump if Register_i isn't zero.

Where Register_i can hold an unsigned integer ( not limited in the
model ) providing as many Registers as necessary for the calculation and
starting with the Input-data mostly in the first Registers and all others
set to zero.

The words >, <, >= and <= CAN be realized even in this absolutely minimal
environment. 

The NanoForth Instruction-set provides much more due to the fact that it
should lead to a working machine. The only question is, if it is very
efficient on the words <, >, etc ...

I've forgotten so many things about programming this model, but I think it
is worth to put some examples in this list the next days ...

Best wishes and regards,

Soeren <tiedema@mail.uni-freiburg.de>