FIF. Another FORTH.

Discussion about ZX80 / ZX81 Software
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: FIF. Another FORTH.

Post by mrtinb »

Moggy wrote: Wed May 05, 2021 5:29 pm At which point you realised that Bonzo was actually fluent in ... COBOL ...
The Cobol guy. That's me. :)
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

mrtinb wrote: Mon May 10, 2021 4:04 pm
Moggy wrote: Wed May 05, 2021 5:29 pm At which point you realised that Bonzo was actually fluent in ... COBOL ...
The Cobol guy. That's me. :)
Siggi too or am I thinking of Pascal? :?
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: FIF. Another FORTH.

Post by mrtinb »

I’ve only used Pascal in my youth learning from books from the library. Cobol I use in my day job. Today! That’s what happens when you’re employed for banks with mainframes. ;)
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

I thought COBOL died years ago. I really am out of touch with computer languages. :oops:
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: FIF. Another FORTH.

Post by mrtinb »

mrtinb wrote: Mon May 10, 2021 6:34 pm I’ve only used Pascal in my youth learning from books from the library. Cobol I use in my day job.
Having said that; I really like pascal, and have studied the ZX81 version quite a bit. (Sorry, I don't want to hijack a great thread.)
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

No hijack that I can see Martin I think it's great having these different languages for the zeddy. :D

FIF81 is really getting under my skin now I cannot leave it alone and when Kelly completes his TF79 that will be at least four different Forths for the 81, happy days. :D
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

Not sure if this is a bug in FIF81 or not but thought it worth pointing out.

Sometimes I wish to compile a word directly onto the console screen rather than the editor,just to try it out, but have found that if the definition is more than four lines long the cursor freezes on the fifth line and the only way to compile is to type one line at a time press enter next line press enter yadda yadda.

Is there a limit on the amount of lines that can be typed to compile a word directly or does it always have to be line then enter line then enter?

Also this particular definition when compiled in the editor, will load but throws up the error OFF SCREEN followed by the words name and a question mark when run.

This program runs in all other Forths when entered as one long line but only in FIF81 if I do it line at a time directly so why no joy in the editor?

Just for reference it is a simple program that points out multiples of three or five with no obscure Forth words.



: ZZZ 1001 0 DO I . CR I 5

MOD 0= IF CR CR I . ." DIVIDED BY 5" I 5 /

." =" . CR CR ELSE I 3 MOD 0= IF CR CR I .

." DIVIDED BY 3" I 3 / ." =" . CR CR THEN THEN LOOP ;
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Hi Moggy,

Neither of those are bugs.

The command line buffer (Line Buffer) is currently set to $80 bytes. If you type more then the last character will just get overwritten. Under development it was a trade-off of allowing a larger buffer vs being parsimonious with free RAM. Given that there's ~21K free RAM with a ZXpand then I suppose more generosity with the Line Buffer size may be in order. Would 256 characters be enough?

The "Off screen" error is a result of you entering the word 'I' in your command line definition while the editor vocabulary is still active (the editor has an 'I' word too and that is getting compiled and subsequently executed). So, either type FORTH DEFINITIONS before your command line definition or use '[' and ']' or their NOUDG equivalents '(' and ')' within the definition.

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

Re: FIF. Another FORTH.

Post by Moggy »

Hi Alan.

Thanks for prompt reply.

Tried the FORTH DEFINITIONS trick and boom goes the dynamite as they say and all is well in Moggies world.

As for increasing the line buffer, yes please and 256 Chrs should be enough because as a certain Mr Moore would have it if you can't do it in one line then you're not doing it right. :lol:

I have to say I'm really enjoying both Yours and Kelly's F79 versions insofar as whilst they both conform to a common standard you both have different implementations, say for example screens and editing which both work wonderfully well and are really keeping me on my toes and yet both arrive at a common ending.

What is most pleasing however is the fact that both F79's are truly compatible with standard F79 works and are both behaving as they should so much kudos to you both.

A very grateful Moggy.

(Warning Tramadol and Scotch are serious ju-ju)
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: FIF. Another FORTH.

Post by mrtinb »

Why is it required to use ZXpand in M=H mode? If you want to run the UDG version, you need memory at location 8k. To have memory at location 8k on the ZXpand, M=L mode is required.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Post Reply