FIF. Another FORTH.

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

Re: FIF. Another FORTH.

Post by roganjosh »

Thanks Moggy. That looks useful.

I've put a new version (0.04) at the top of the thread. It's a bugfix for a very intermittent screen loading problem. I had, in the last version, already incorporated D-

The new release also contains, as a screen wav file, your PAP words and D* D/
I've added a Readme file in the editor and Moggy directories to show which screen number to load.
If I'm to add your SQRT stuff as a screen it'd be far easier to do if you can provide the uncompiled word definitions.

I've finally got the ZXPAND+ connected so I've started looking at that. As I've said before, things will get much much easier with screens when the SD version is ready.

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

Re: FIF. Another FORTH.

Post by Moggy »

The SQRT PDF can be found here...

http://www.forth.org/fd/FD-V04N1.pdf

I worked directly from this rather than have it written down somewhere which would have made it easier to copy and paste so apologies for that.

This works as per my previous post except that for the word I call ROOT, the PDF version is called XX and this is the one I had trouble with,plus my version is less cluttered and does roots <= 4294 instead of <= 4095 but the rest is ok so rather than compile XX do all PDF stuff, then for ROOT...

: ROOT 1000000. D* SQRT SWAP 3PAP CR ;

Also I shortened some of the word names so in my case the word EASY-BITS become just EASY for memory saving and bone idleness to be honest.



I have to add as well that whilst the vain side of my nature appreciates acknowledgements I have to be honest and point out the D/ and D* operators were written by Kelly Abrantes Murta and Alan Winfield respectively and gratefully used rather than written by myself.
Last edited by Moggy on Tue Mar 30, 2021 10:47 pm, edited 1 time in total.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

Just a thought.

A call to BREAK would be nice as in H4th and Toddy, for when stuck in a big DO-LOOP when experimenting I find it more useful than pulling the plug.


EDIT
Also if you see the word ZZZ in the dictionary from any file I may post please delete as this is just a bit of nonsense I use testing and serves no purpose.
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Ta. I'd intended to introduce a kind of ?KEY in conjunction with IF and LEAVE mechanism for that but hadn't yet implemented the key routine.
I'll have a look at BREAK.

I've updated the zip file so it now contains the sqrt functions as a screen. The Readme gives appropriate credits. I might change the screen number at some point so you don't need to EMPTY-BUFFERS - but clearing the buffers is good practice anyway.


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

Re: FIF. Another FORTH.

Post by Moggy »

Error in the credits file.

Should read D/ by Kelly Abrantas Murta.

D* is by Alan Winfield.

Sqrt taken from Forth Dimensions magazine, article by Klaxon Suralis.

My only contribution is ROOT and the 1-6 PAP words.
Last edited by Moggy on Tue Mar 30, 2021 10:44 pm, edited 1 time in total.
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

OK. Ta. Fixed.

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

Re: FIF. Another FORTH.

Post by roganjosh »

Moggy wrote: Tue Mar 30, 2021 6:17 pm A call to BREAK would be nice as in H4th and Toddy, for when stuck in a big DO-LOOP when experimenting I find it more useful than pulling the plug.
?BRK has been added so you can now (e.g.) use ?BRK IF LEAVE THEN

VLIST now works at full speed but the display will pause if you hold down the break key.

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

Re: FIF. Another FORTH.

Post by Moggy »

Excellent. :D
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

Spoke too soon.

Only tried this with SZ81 and the call to break just resets it to BASIC, what I had in mind is a break function that just stops the program and returns to the console as per Toddy Forth.
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Moggy wrote: Wed Mar 31, 2021 12:39 pm Spoke too soon.

Only tried this with SZ81 and the call to break just resets it to BASIC, what I had in mind is a break function that just stops the program and returns to the console as per Toddy Forth.
Now I'm confused again. Are you saying FIF crashes out to the BASIC K prompt for you? If so, are you using ZXPAND without CONFIG "X" ? The break call will only currently work with the ZX81 ROM. Also, when you say the 'console' do you mean the BASIC prompt or the FIF OK prompt?

Are you wanting any extra word (e.g. ?BRK) within a DO loop to get this behaviour or is it an intrinsic part of TFORTH? I've downloaded TFORTH from http://zx81.eu5.org/toddysofte.html#Toddy_Forth
and I can't see any word you might be using to put within a loop. Also, I wrote a simple word to do a DO loop and the break key didn't automatically do anything.

Alan
Post Reply