Quote:
Quote:
What has kept me from publishing my own '02 Forth is that there are still a lot of fragments left that one particular company could claim a copyright on.
That is also my concern. You may, however, be referring to code that you developed for your Automated Testing System. If not, can you clarify what the issues might be.
I have no trouble giving away my ATE code. It was not copyrighted, and although the company I did it for used it for many years after I left, I'm not sure they're using it anymore. Where there's a slight chance of a problem is that we started with a 6502 Forth metacompiler that ran on the PC, and that came from a supplier who started with the FIG-Forth public-domain material but made their own modifications to make it Forth-83, changing, IIRC, the way it branches (which wasn't necessary, and they made it less efficient), does floored division, DOES>, and a few other things. It would not be very complicated to change those parts that aren't either public-domain or my own doing-- I just have to go through a lot of code and find them all.
What would take more time is writing it all out in a form that an assembler, instead of a metacompiler, could use. If I distribute it, it will have to be in a form that can be modified and re-assembled without the overpriced PC-based metacompiler which the company quit selling when I pointed out all the sinkholes (not mere pot holes!) in Forth Dimensions magazine. (I didn't give the name of the company in the article, but it wasn't hard to figure out.) The bugs became more and more severe as my overall code grew to 10,000 lines. (And this wasn't like the FIG source which only has one word per line, either.) Since the metacompiler itself was a black box, I could not get into it and fix it like you can in Forth. I figured out some work-arounds but they were running out of gas and I pretty much decided I'd have to re-write it for an assembler anyway even for my own use.
Quote:
I started with the FIG Forth code that I downloaded from this site. I then re-wrote it about 20 times, making several major changes to the architecture, especially in the data stack. This means that most primitives do not look even remotely close to the original
For many primitives, if you had a contest to write them the most efficient way, all the good entries would probably be identical, unless you made the stack grow up instead of down, or something like that. Those of course are not the ones where one has to be careful not to infringe on copyrights, since Bill Ragsdale did it first and made it public domain.
Quote:
In order to fit into this space, I did have to make some tradeoffs. But you can always define new primitives for performance as needed.
This was a nice thing I found about the '816 when I was writing my Forth kernel for that (which is entirely mine, unlike my '02 Forth kernel). In many cases, primitives on the '816 were not only faster than secondaries (as expected), but took
less memory, and were even easier to write, than the secondaries. It was a nice surprise, considering most '02 fans who aren't familiar with the '816 yet tend to view it as more complicated and difficult. As a result, I have hundreds of primitives. Many of the words that were secondaries in '02 Forth were totally practical now to turn into primitives on the '816. This improves the performance not just in the obvious way, but also in that NEXT runs far fewer times to get a job done, as do nest and unnest.
Quote:
Quote:
but I have implemented zero overhead interrupt support.
It impacts Forth runtime performance, but has the advantage that it makes writing event-driven...
The impact on runtime performance is extremely small-- basically negligible.
Quote:
I wouldn't use zero-overhead interrupts because I prefer more control in my code, and I'm willing to pay the price in high-level expressivity.
I use both the zero-overhead Forth ISRs and assembly-language ISRs. The Forth ones can still have assembly mixed in. The interrupts that need the fastest response of course get assembly, and they get priority. But if there's a chance that they will need to be able to report an error condition and ask for the user's preference as to how to fix it, the assembly-language ISR can have a Forth ISR handle the displaying, the key input, and other things that are far easier to do in Forth.
Quote:
Quote:
I know, I know, if we're going to keep plugging Forth, we really ought to have something a little more turn-key for beginners. That, however, almost means either bundling it with working hardware that we supply, or publishing a version that is for specific hardware that's already available, whether Daryl's SBC-2 with a certain LCD, or something like that. As it stands now, the newbie would have quite an uphill battle to learn a system that he cannot see working yet, in order to make the necessary changes so it will work on his own hardware.
One of my design goals was to eliminate this problem. As it stands now, The Forth kernel is completely ignorant of any hardware as I want to use the same kernel regardless of what hardware is attached.
Forth really only has two methods for interfacing to the world, get a character (KEY) and put a character (EMIT).
KEY and EMIT are primarily for human I/O, which is only a minor part of my workbench computer's I/O; and even then, there still needs to be code to take care of the details of how to feed data to the LCD, scan the keypad, bring data in from a UART, etc.. If the newbie doesn't have those written and debugged already, he'll have quite an uphill battle to get it all going. It would be nice if he could start with something that works right out of the box-- plug it in, turn it on, see "Ok { 0 }", and, before he's out of page 1 of the tuturial, be typing in something and seeing results.
Quote:
Quote:
Keep hammering on us and someday we might get you a turn-key "starter kit".
That will always be the dream. I too am concerned about the copyright issues. Garth, please help us work these out. I would like to share this work since I have put so much into it.
I don't know about copyright issues other than to get the parts out of my '02 Forth that the metacompiler company might be able to claim any copyright to. If you're talking about supplying a turn-key setup to make it easier for others to jump into Forth, I don't know the perfect answer, but if there's more interest now, it does help motivate me. Should we start with Daryl's boards? I have jury duty this week, then a trade show to get ready for, then a business trip, so I probably can't do anything on it this month, but hopefully soon-- again, if there's interest.
Quote:
Still should be faster than BasicStamp.
The '02 ITC Forth averages about 12,500 primitives per secocond per MHz. My '816 does about 31,000 per second per MHz. If that's not enough, you can, at any time, jump into assembly at any time with the assembler that's part of Forth and can assemble a little piece of code in a fraction of a second instead of requiring a long cycle to re-compile the whole application. Another task that may be running at the time does not need to be interrupted.