ZX81 Toddy Forth-79
Posted: Sat Jun 05, 2021 11:52 pm
When I released the first version of Toddy Forth about 10 years ago, my main motivation was to learn more about this curious and fascinating programming language, whose first contact dates back to 1987, through a basic compiler published in the Brazilian magazine Micro Sistemas . Another motivation was to come up with a system complete and robust enough to meet the main needs of a Forth enthusiast who wanted to use the language on their ZX81, without having to rely on an external PC for screen editing.
With the development of the various versions of TF I ended up reaching some of these goals, but something was still missing, as the system was suffering from an identity crisis, it was a mixture of various flavors of Forth with some parts that go back to Micro Systemas's Forth, others from FigForth and also from Camel Forth. For the next step it would then be necessary to adopt a unique identity, a defined pattern.
Among the options I considered were Camel Forth (ANS Forth), Forth-83 and Forth-79. In the beginning I was quite inclined to go for the Forth-83 but I ended up choosing the Forth-79 because: 1- it was the existing standard when the ZX81 was released; 2- The Forth-83 was not very well received by the market at the time; 3- It was the standard adopted in Jupiter Ace; 4- There is a lot of literature available on the net about F79. (As for Camel Forth, it's still in the plans and if it becomes a reality then we'll have an old school Forth and a more modern one for the ZX81, as per the ANS standard).
And so, after a long period of development (carried out in my few spare time) I bring to anyone who might be interested, my version for the ZX81 of a Forth system that almost entirely meets the specifications of the Forth-79 standard. Minimum hardware requirements are a ZX81 equipped with a ZXpand or ZXpand+ (tape is not supported). The TF79 also supports the Chroma81 and ZON-X81 interfaces, with specific words to activate the features available on these devices.
The keyboard routine features auto-repeat and audible feedback (via ZON-X81) and gives keyboard access to all ASCII characters, including lowercase letters (requires Chroma81 or an UDG4ZXpand).
For handling screens the same RAM disk concept found in Lennart Benschop's ZX Spectrum Forth-83 was adopted. I take this opportunity to register my thanks to Lennart for granting permission to embed his extensions package into the TF79. At the moment only the Screen Editor has been ported, but soon we will have the other extensions such as Assembler, Floating Point, multitask, and others.
I also leave my thanks to Moggy who has been using the TF79 and made valuable remarks.
The Toddy Forth-79 comes in two versions, one conventional (NOUDG) for systems without character redefinition capability and the other (UDG) for equipment connected to a Chroma81 or a UDG4ZXpand, which allow this redefinition. Following the download link, see the DOCS folder for use instructions and other useful information.
(03/03/2024) New release: 1.14
Fixes for this version:
- INKEY word with inconsistent behavior
- WAIT word with inconsistent behavior with argument 0
- Unification of both UDG and NOUDG versions
- Fixed a problem with the BREAK key (SHIFT+SPACE), thanks to Moggy for alerting me to the problem
(09/10/2022) New release: 1.13
*(27/11/2022) Get updates for EDITOR and HGR extensions here: viewtopic.php?p=49367#p49367
(11/06/2022) New release: 1.03 (Obsolete, see the latest release above) Fixes for this version:
- Fixed the word PAUSE that was incomplete
- Fix in the keyboard reading driver, there was a bug that prevented the KEY word from working
- Replacement of . by U. in 79-STANDARD setting to print the free memory
- Documentation redone and updated
Of these bugs, the only really impacting one was the keyboard routine, impressed that no one noticed it.
Note: If you find any error or inconsistency while using the TF79, please let me know here, thank you.
Demonstration of Chroma 81 support:
https://youtu.be/QkMpZ2v7vw4
---
TFORTH79-101.zip
(102.36 KiB) Downloaded 246 times
(Obsolete, see the latest release above)
Edit (08/07/2021): Identified an error in the definition of the word UNTIL in the Assembler vocabulary, the following package fixes the error. (Edit at 09/07/2021: This error was just for me, it is not present in TFORTH-101.ZIP. Sorry for the false alarm)
Edit (04/09/2021): Fixed Floating Point Extension words F< , F. and F.R . Download the new file below: