On 9/12/22 10:50 PM, Charlie Gibbs wrote:
> On 2022-09-13, 25B.Z969 <
25B....@noda.net> wrote:
>
>> FORTH commands push data onto a stack and then you enter
>> some kind of command to deal with it. "2 2 +" pushes a
>> 2, and another 2, onto the stack and "+" is for adding
>> the nearest two numbers on the stack together. You can
>> print that, in 'live' mode, or DUP it and pass the result
>> to something else. FORTH uses a lot of very cryptic-looking
>> operators.
>
> <snip>
>
> I heard about Forth (not in all caps, please) and it sounded
> interesting enough that I bought Leo Brodie's _Starting Forth_.
> I found a CP/M implementation and played around with it a bit,
> going as far as writing a Sieve of Eratosthenes program.
>
> I never went much farther with it - I was busy moving from
> various assembly languages to C at the time - but it was
> a fun language to play with.
>
> Forth love if honk then
Heh ...
Maybe Yoda talked in words of Forth ? :-)
Forth was a product of "limited" systems prevalent
in the early 70s to early 80s ... boards far less
powerful than a VIC-20 or even a ZX-80.
Academics and engineers DID love to use digital
though, but the trick was in putting something
small ON them so you weren't stuck with ASM where
you'd have to compile and then copy from a bigger
system.
As said, Forth was writ by a radio astronomer who
wanted to take advantage of digital control to steer
his big dishes around - but needed more flexibility
and much faster concept-2-result. Burn the interpreter
and your selection of vital libraries onto a ROM,
hook up a cheap serial terminal and you could write,
mod, debug, run all in-situ on those tiny little boards
up on a cold mountain. The super-simple syntax and
fairly anal adherence to using the stack for everything
made the interpreter small.
For its time and place, Forth WAS a logical choice.
I wouldn't really recommend it for much of anything
these days except maybe certain microcontrollers, but
it still IS kind of interesting. As there ARE for-pay
development systems out there it would seem there are
continuing uses for Forth.
If you're interested :
http://forth.org/compilers.html
(not all links are good)
I also found :
https://en.wikipedia.org/wiki/4-bit_computing
The 4-bit processors were programmed in assembly language
or Forth, e.g. "MARC4 Family of 4 bit Forth CPU"[7] because
of the extreme size constraint on programs and because
common programming languages (for microcontrollers, 8-bit
and larger), such as the C programming language, do not support
4-bit data types
I think Epson still makes 4-bitters - for digital keyfobs
or simple remotes and such. 8-bit chips are cheaper these
days however. I did look at the Epson docs once though -
those are impressive 4-bitters, gobs of flexibility
combined with really low power consumption and simpler
board construction. I think they're all mask-programmed
now though ... send the company your code and they
embed it permanently on the chip die and sell you 100,000
of them.
Hmm ... didn't 'C' used to support 'nibbles' - 4-bit data
types ??? Maybe I misremember. You could FAKE 'em easily
enough though.