Hello @williams2
You might be interested in FreeForth
I will definitely look at FreeForth. I spent a lot of time with stack-machines similar to Forth.
I started a new topic, because my earlier "Q" was about the 6809 LEAX/LEAY instruction. But you mentioned Forth and Pythagorean squares. (Ha! I worked in a laboratory once. They had an Olivetti programmable calculator. On weekends I set it going calculating prime numbers. Very exciting, printing prime numbers! Would calculate for a whole weekend; on Mon AM would collect a long list of (very interesting) primes. This machine had a 256 program memory. Probably a mercury delay line (or something like that ... Have no idea how much it cost ... but I'll bet it was expensive ...) Yes, I'm quite mad. What's interesting about prime numbers?
I attached the first few pages of assembly code for a Forth-like engine I wrote for the 68HC11.
Few people will be interested so ... Plus - the original listing is over 500k, so I trimmed it - a lot. The first few pages will give an idea of capability. Nothing to do with Puppy/Linux/Bash, so ....
I say "Forth-like" because I got original source (for an 8085) from the chemistry dept of UoArizona.
Two fellows called Tilden/Bonner. Very generous. They asked that I retain/acknowledge their design as "Convers". I did that - even when I re-coded for a completely different uP. The 'HC11 version is interrupt-driven. I extended the concept of Forth "words" so that a work-space (with a separate stack) was allotted to a 'task'. Generally every task began on arrival of an interrupt. So ... do nothing until needed.
I wrote software to control an experimental brick-laying machine in the Convers language.
The program would measure distance travelled and "do things" to bricks and water and so on.
I've seen a small 8085 CPU run 4 loss-in-weight feeding systems simultaneously; the program calculated loss-in-weight by fitting a line of best fit to readings from a weighing-deck using the least-squares method.
Task hierarchy in the 'HC11 program was allocated by order in a "task-table". There were 8 task-spaces available.
Task switching was done by an optically isolated signal from the "outside" and based on assigned priority.
If a higher priority task interrupted a lower-priority task then the higher task would run to completion. After that the lower priority task would resume where it was interrupted.
I wrote this in 'HC11 assembly language. The code would be more elegant for a 6809 - but the '09 lacks the hardware capability of the 'HC11. The 'HC11 is a true microprocessor. The '09 is an 8-bit version of a mini-computer and would run C code very nicely. I say that because C is fundamentally a language built over a stack machine. But I'm rambling now; excuse me. I'll stop.
Собака