Sparky, thanks for replying.
We'll work out the timing to whatever is needed. FORTH is pretty fast on old and limited procs with tiny memory and also has a built in assembler if we really need to get down and dirty for something. And there are two interrupt input pins on the board, etc.
Like I said a display isn't top priority for me -- a rotary switch and knob can select pitches very conveniently, a dip switch also, though less conveniently. I even have a plan B.
I don't know C so it wouldn't help any to see your code. I do thank you, though!
Nobody uses FORTH these days. Or even knows what it is. Just guys from the early eighties era of computing. And even then, not many.
FORTH is a language that you write your own language in. It suits the way I think. I never felt anything else fit as well. People make a big deal nowadays over various unusual characteristics like the reverse polish notation for math, the use of the stack and untyped variables, 1024 byte blocks for storage, etc. But they never seem to make much mention of the fact that it is a language
designed to create your own language in. That's the critical point of interest to me!
A FORTH program works by defining words in your own invented program language at a low level, and combining those into definitions for higher level words until you get to the top of what you want to do -- the last word in your dictionary that does it all.
Utter that word and boom your program runs. I think that's cool! Just a quirk of mine. The rest of the stuff is just mechanical details. I learned them a long time ago, and don't even think about them. But it's easier for people to talk about and give little demos online of using the stack and RP notation. So you don't see much about
why you'd ever want to learn a language that requires that.
FORTH isn't
useful because of unusual arithmetic operations -- they're a pain in the neck for most experienced programmers. It's the way you create a program that's wonderful, to me. And how compact and fast it is. And that's possible
because of the stack and RPN -- they're the primitive base words and functions very close to how the proc works and sees things.
Your program builds up from this low level of words to a level so high, one word does it all. Everything you want, in a single command. That's the highest level of the language. There aren't subroutines and calls. rather every FORTH word is a subroutine, and there is no distinction between the words you define and the base words that come with the system. They are all part of the grand dictionary, and can be used to make up new words.
Okay apologies for going on and on about this. Using FORTH again brings back the interest and excitement I had when I first started using computers, so I start chattering!
Yes, back to building the lathe as soon as the shop dries out. 1/4" of water on the floor because of ice out here. Early crocuses just beginning to show. Daffs not up yet. Still some white stuff out there in patches and the streams are roaring....