FIF. Another FORTH.

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

FIF. Another FORTH.

Post by roganjosh »

Edit: The latest release of FIF will always appear here. The original post appears further down.

The latest release is FIF 1.03

Fif-1-03.zip
(698.85 KiB) Downloaded 219 times

Read the ChangeLog in the Docs directory.


Alan


--Original Post--

There's been quite a bit of FORTH activity in this forum. Coincidentally I've also been working on a ZX81 version:
[File was provided here]
It's a pet project I'm providing on the off-chance anyone finds it interesting. Having done FORTHs for the Atari ST and QL, with lots of memory to hand, I was interested to see how close you could get to a FORTH-79 Standard implementation on a ZX81 having just 16K RAM of RAM and a cassette recorder. It seems like you can. Also provided is a different version which assumes you've got RAM-based User-Definable Graphics as well. As I say in the documentation, this is a bit of a cheat given the initial design criterion but it does make life a bit easier as you have access to @!#[]%'&^ characters and you can always lie to yourself that you're not using them.

Now that the minimum hardware version is done I will be producing new versions which make full use of the capabilities of ZXPAND(+) and CHROMA 81. I'll release them if there's any interest and it's not already too crowded a field. I can also release the source code when things have settled down a bit.

It's best to read the Intro.txt file in the Docs directory first. Screens.txt describes usage of screens (blocks) and the traditional old-fashioned line editor vocabulary. fif81.txt provides a glossary of the available words and their stack usage.


Alan
Last edited by roganjosh on Wed Jun 02, 2021 10:56 pm, edited 23 times in total.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

Always room at the inn as they say! The more guns in the arsenal and all that.



Just had a quick shufty on emulator and noticed a simple print DO-LOOP was pretty sharpish but also noticed it has a key repeat which is great in emulation but with a Memotech external key-board on real zeddy
iiitttt ccccaaaannnnnnnn beeeeeee proooooblllammmmmmattttic!!! :lol:

Will have a play with and report back.

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

Re: FIF. Another FORTH.

Post by Moggy »

Not Memotech friendly I'm afraid.

Orrr sssshouuullld ttthaaaaat bee noootttt Meeeeemmmmotechhhh etc etc

Kmurta dropped the custom keyboard routine from Toddy Forth for the above reason as there are a lot of Memotech users out there. I have never understood why one would want to waste valuable memory on a custom keyboard routine just for a repeat key routine when the one in the ROM is perfectly adequate for all types of external keyboard and no, altering the repeat rate doesn't work I'm afraid.

I can understand it for deleting lots of lines of assembler or BASIC but Forth word compilations are so small it hardly seems worth it but it's your baby to do with as you think fit. :D

Will dig out a vanilla zeddy and have another bash.
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Chortle.

Thanks Moggy. Always very useful to know the interaction with real hardware. I'll replace the existing keyboard input routine with something else. I should have mentioned that it's almost exclusively been tested under EightyOne. I'll fire up a zeddy & ZXPAND+ after altering the code.

Alan
Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Re: FIF. Another FORTH.

Post by Lardo Boffin »

A ZXPAND version sounds very interesting! Presumably even with Forth loaded you would still have over 16K RAM for the user’s program? Also (hopefully) nice easy to use routines to allow you to load and save data into the program from the ‘spand?
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

Quick report.

I always format numbers to at least 3 places after the point and for some stuff, 6.

The standard 79 number formatting system IE : ZZZ <# # # # 46 HOLD #S #> TYPE SPACE ' seems ok but just a selfish suggestion on my part, is it possible to allow the point to be placed anywhere in a double number input rather than just the end as visually it makes entering decimal numbers look better.

For example in toddy Forth/other Forths...

12.345 11.111 D+ ZZZ answer 23.456


FIF81....

12345. 11111. D+ ZZZ answer 23.456


It just makes decimal number entry so much easier, again selfish I know but I think most Forths work this way.

Otherwise this looks like a bit of fun.


Pours one of several large scotches and settles down for a night of key bashing
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

Lardo Boffin wrote: Fri Mar 26, 2021 9:32 pm A ZXPAND version sounds very interesting! Presumably even with Forth loaded you would still have over 16K RAM for the user’s program? Also (hopefully) nice easy to use routines to allow you to load and save data into the program from the ‘spand?
At this moment in Time Toddy is the only one that fits that bill and does it bloody well plus load and compile too.
The latest beta version Kelly is working on and I'm kicking to death for him to iron out bugs, leaves about 9k but it is very well stuffed with a bit of 64 bit maths possible if I read him correctly.

You have to remember unlike H4th which is a hard ROM operating system which when used with the spand leaves about 30k to play with for storage, this Forth just like Toddy is a program which rides on top of an operating system so leaves not as much memory as you would think if it is to have any kind of useful functions.

The old philosophy of Forth was compile and run which because the programs were so small took no time whatsoever.

So you would load up your flavour of Forth create say a small SQRT program for example in an editor screen and save it un-compiled. Then when needed load it up compile and run. With the large storage we now have on the spands SD card it is just as easy to save a complete compiled program.
I have various maths programs all stored ready compiled so I just load and run. These programs are just the Forth library with my newly compiled words/programs added.
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Moggy wrote: Fri Mar 26, 2021 9:48 pm is it possible to allow the point to be placed anywhere in a double number input rather than just the end as visually it makes entering decimal numbers look better.
I'll certainly have a look.

I've just put a new zip file at the top of this thread (version 0.02). It should now work with standard keyboard input i.e. no auto-repeat. Rather than keep tapping backspace (or SHIFT-0) you can always type SHIFT-1 to delete the whole line.

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

Re: FIF. Another FORTH.

Post by Moggy »

Excellent Alan many thanks will download run rinse and repeat.

Pours more scotch
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

Alan I think you may have accidentality hit a winner in one small regard.

Even though the Memotech keyboard is a nice bit of kit, under normal use you still have to type fairly slowly but steadily due to how zeddy reads the keys.
If you have the Memotech word processor module then the custom routine inside that device's ROM lets you type full chat as it were but only for that device.

Guess what Your routine minus repeat is doing the same thing, full speed typing!!!

Love the SHIFT-1 thing ,very useful.
Post Reply