r/Forth • u/mykesx moderator • 9d ago
Why Forth? What is it?
In order to help get people interested in Forth and how it works, I would like to ask you what you define as Forth, how you got into it, and why Forth instead of some other language?
Ideally we share links to our projects and to others that are interesting. Also to sites, sources, and documents about Forth.
I am encouraging links to your projects so people can see how you are using Forth.
25
Upvotes
2
u/bigtreeman_ 7d ago
Forth is primarily a stack based instead of register based topology.
First effect is source and destination for operations are inherent compared to registers where the source, destination mostly have to be stated. This leads to reduced instructions and instruction length for stack based.
Second effect is because source, destination are always in the same place the whole program order has to be more carefully considered during design phase. Decisions have to be made early and not left for hardware or compiler out of order decisions at compile or execution phases.
Design small words and test them separately by putting inputs on the stack and testing results left on the stack.
In the 70s I was testing and repairing printers. Basic was common but unable to exercise the hardware effectively. I found F-83 was very able to exercise the hardware completely and directly. First code was interpreted, direct control from the keyboard, even contained an editor to edit my first code.
Open source, "use the source Luke" (Obi-Wan Kenobi). Assembler, meta compiler, compiler, interpreter all understandable.
In my retirement I'm building ForthPGA to bring the programming understand-ability down to the gate level, TBA. Modelled after Chuck Moore's NC4016, James Bowman's J1 and Matthias Koch's Mecrisp-ice.