FIF. Another FORTH.

Discussion about ZX80 / ZX81 Software
Post Reply
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Ah, thanks. I hadn't seen that topic. I did try several forum query parameters and they either found nothing or found ~500 hits. Looking at the ZXPAND EPROM zip file shows that the ROM has 66 at $1dff. Given that you say yours are running version 6.6 then it's no surprise it didn't work on your Spandexes. Blimey, half a dozen of them! I thought I was doing well with one classic and 2 pluses.

Anyway, I've got a new version ready and waiting to upload after you confirm your ROM numbers (the AY boards or firmware versions don't matter). The test has been changed to assume a classic if the rom version is less than 74, otherwise it'll assume a '+'. I've also renamed CLS to PAGE. I wasn't disputing that PAGE was named by the F97 team, just that I never came across it as it's not a member of the minimal set of words needed to qualify a Forth as being a F79 one.

I use an SD extender https://www.ebay.co.uk/itm/384075199643 to save wear on the ZXpand sockets.


Alan
User avatar
kmurta
Posts: 302
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: FIF. Another FORTH.

Post by kmurta »

Hello Alan!

Good to know that there are more people interested in Forth development for the ZX81! Coincidentally, I am also developing a new compiler compliant with FORTH-79 standard, it is already in a very advanced state (Moggy is my beta tester ;) ) and only a few minor adjustments are needed before I can releases it.

Interesting the solution you adopted to handle the screens with ZXpand, one file for each screen. Initially I thought about adopting this same approach, but I ended up choosing to work with the RAM disk concept, much under the influence of Lennart Benschop's Forth83 for ZX Spectrum. Both solutions have their pros and cons, for example I only have 8Kb (8 screens) for the RAM disk when I use only the ZXpand RAM. But I believe that this is sufficient for most applications and this limit can be increased if Chroma81 is available or another RAM expansion added to work with the ZXpand.

Regarding ZXpand support, to ensure maximum compatibility I decides to directly incorporating the main routines and in my tests with the EightyOne emulator it works in both classic and plus (+) versions. I believe Moggy has also done tests with ZXpand+. Then, see in the attached file if these routines can be useful to you.

Greetings
Kelly

ZXpand.txt
(6.09 KiB) Downloaded 74 times
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

@ Kelly.

Hi Kelly.

All good so far with TF79. I have steadily worked through the examples in Alan Winfield's book and only the S->D caught me out as it's now S>D.

Other than that no problems,please e-mail if there is anything specific you want me to check.


@ Alan

Checked my spands and the three are running Troll 6.2. with 6.6 EPROMS however the issue three is showing 67 at address 7679
and the issue ones are showing 66.

Please let me know if you want me to check anything else.


Regards to you both.

Moggy.
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Hi Kelly,

It's great to see that Forth still has its fans. One of the reasons I went with a screen per file was I'm trying to be as parsimonious with RAM as I can at this stage. I've only just started to think about how I'm going to handle Chroma 81. I know, though, that it's going to use up another wadge of RAM equal in size to the DFILE. My feeling was that miserliness at this stage might make it easier to decide on the best memory configuration later (or indeed configurations). The other reason was familiarity/nostalgia as the first Forth I used was one written by Richard de-Grandis Harrison for the BBC micro who used the same approach.

Thanks for the ZXpand.txt file. It looks like we adopted the same general idea. I too incorporated the ROM routines primarily so that error handling could be done by me rather than the ZXpand. The main difference I see is that you make use of api_responder. I chose to handle that myself to try to minimise the risk from any future ROM updates. That's why I've needed to find out the ROM version numbering scheme so that the code can select the ZXpand classic's polling code method or the ZXpand+ status register as appropriate. Hopefully Moggy won't have any version numbering surprises to report later. If not the problem is solved.

It's amusing to see that we've both named our block load and save commands the same (BLOAD & BSAVE). Looks like you're a Jupiter Ace fan too!


Alan
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Thanks Moggy. There's a new version up, as promised, which should now hopefully work with all your ZXpands. Very much appreciated.
Onward to Chroma 81.

Alan
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

Great news and it's nice to see two people working on this wonderful language, more power to you both from a very grateful recipient. :D
User avatar
kmurta
Posts: 302
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: FIF. Another FORTH.

Post by kmurta »

roganjosh wrote: Sat May 01, 2021 8:35 pm Hi Kelly,

It's great to see that Forth still has its fans. One of the reasons I went with a screen per file was I'm trying to be as parsimonious with RAM as I can at this stage. I've only just started to think about how I'm going to handle Chroma 81. I know, though, that it's going to use up another wadge of RAM equal in size to the DFILE. My feeling was that miserliness at this stage might make it easier to decide on the best memory configuration later (or indeed configurations). The other reason was familiarity/nostalgia as the first Forth I used was one written by Richard de-Grandis Harrison for the BBC micro who used the same approach.

Thanks for the ZXpand.txt file. It looks like we adopted the same general idea. I too incorporated the ROM routines primarily so that error handling could be done by me rather than the ZXpand. The main difference I see is that you make use of api_responder. I chose to handle that myself to try to minimise the risk from any future ROM updates. That's why I've needed to find out the ROM version numbering scheme so that the code can select the ZXpand classic's polling code method or the ZXpand+ status register as appropriate. Hopefully Moggy won't have any version numbering surprises to report later. If not the problem is solved.

It's amusing to see that we've both named our block load and save commands the same (BLOAD & BSAVE). Looks like you're a Jupiter Ace fan too!


Alan

Yes, I understand, the use of RAM in the ZX81 has to be done very sparingly. As for Chroma81, I already have the routines ready, if you need I am available to assist you. See my experiments with it here: https://youtu.be/yV3dX4VgqkY (tested only in EO, I don't have a Chroma81)

As you can see, I have done several experiments with Forth, and besides Camel Forth I have also practically completed a Forth83. But I chose to focus my efforts on Forth79 for historical reasons, after all it was the embryo of the modern forth. After finishing it, maybe I will resume the development of the ZX Camel Forth.

As for the use of ZXpand API vectors, their reason is precisely to avoid conflicts in future ROM updates, so I think it is relatively safe to use them (and saves a few bytes). In previous versions of Toddy Forth, I made use of api_fileop, but it is not flexible as it requires the supply data in a single string. Incorporating the read/write routines directly, I now have more flexibility in IO operations since I can pass the address and data lenght through the stack.

About BSAVE/BLOAD you are correct, my reference was really Jupiter Ace, although this syntax is also used in other computers/languages.
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
User avatar
kmurta
Posts: 302
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: FIF. Another FORTH.

Post by kmurta »

Moggy wrote: Sat May 01, 2021 8:10 pm All good so far with TF79. I have steadily worked through the examples in Alan Winfield's book and only the S->D caught me out as it's now S>D.
S>D was introduced by Forth83 and I used it on the previous Toddy Forth, so I kept it. S->D is originally from FigForth and is not foreseen in Forth79, but thinking better I think that for historical reasons it is more coherent to adopt this spelling in ZX81 Forth79.
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Hi Kelly,

Impressive stuff. Thanks for another generous offer. Most of the fun though, as you know, is thinking about things for oneself. Therefore I make it a policy not to look at someone else's code until I've got a working implementation of my own. After that it's always informative to see how things could otherwise have been done better and, if licensing allows, possibly incorporate the best ideas of both. So I'm definitely interested in what you've done but it might take me a short while to get to it.

Alan
User avatar
kmurta
Posts: 302
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: FIF. Another FORTH.

Post by kmurta »

Hi Alan,

Don't worry, I understand perfectly! After all, what would be our motivation if not the challenge and the fun of doing it? ;)
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
Post Reply