FIF. Another FORTH.

Discussion about ZX80 / ZX81 Software
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

I think we cross posted and you may have missed the one above yours.

And the inverse jobby is starting to look very interesting. :evil:
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Moggy wrote: Wed May 26, 2021 9:09 pm D2* is missing from the glossary too or am I not looking hard enough?.
I've only been putting words in the glossary that are in the core vocabulary, not defined in Screens, so that was quite intentional. I described the EDITOR words elsewhere after all. I was waiting until you were better to ask you to provide glossary terms for your words in screens 8&9 so that I could add them to a file called WordExtensions or AdditionalWords or somesuch. I occasionally have my compassionate moments.

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

Re: FIF. Another FORTH.

Post by Moggy »

Hells teeth Alan I think you would be better placed to provide that kind of gubbins but will have a bash if you want,

This CHR defining malarky HEE HEE YES YES LOVE IT LOVE IT!!

I noticed that if you have a screen full of new CHRS then decide to revamp them then the screen instantly changes to the new ones and any DO LOOP that prints them doesn't have to be redefined.

Top bloody drawer as they say in Barnsley.

PS how do you work out the grid patterns for the UDGs number wise. as whilst I'm getting some fun shapes I haven't a clue what I'm doing !!
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: FIF. Another FORTH.

Post by Moggy »

You got the D/ and D- is this ok for D* ?


D* (nd1\nd2 ... nd3)
Uses/Leaves
Double number version of '*'



The SQRT and ROOT words I hijacked as I think I said a while ago from a a Forth publication which I can point you to but Kelly had to do a bit of gubbins with SQRT be cause as it stood it was either using floored division or standard I can't remember which (too much Tramadol and whisky) but can show you his alteration if that helps.
Whilst I know how to use these routines I haven't a scooby how they do their magic I'm afraid.

The PAP routines are just standard Forth 79 number formatting routines found in any work on the subject and not special to myself so not needing any explanation I would have thought?
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Barnsley eh? I lived there from the age of 12-18 so I know it very well.

I'm assuming you know that characters are defined using an 8x8 grid. The glossary gives the definition of CHRDEF as

n1\n2\n3\n4\n5\n6\n7\n8\c CHRDEF

n1, though a word, represents a byte giving the bit pattern for the first line of the grid and n8 represents the last line. The individual pixels are represented by the pattern of 0s and 1s in the binary form of the numbers reading from the MSB to the LSB.

I'm sure you knew that though and I suspect what might be throwing you is that when defining one of the inverted characters you must define it as the inverse of what you actually want. So, whereas you'd expect a $aa (10101010) in the inverse set to display a black left hand pixel followed by a white one, it will instead print a white one followed by a black one. If you redefine a non-inverse character then $AA would give what you expect i.e. black/white/black/white/...

So, to redefine inverse B to be a mathematical equivalence symbol you would use:
FF 81 FF 81 FF 81 FF FF 62 CHRDEF (but, if you were redefining it to replace a normal B you'd use 00 7E 00 7E 00 7E 00 00 42 CHRDEF)

It's a feature of Chr$128, not of FIF.

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

Re: FIF. Another FORTH.

Post by Moggy »

I once played a club at Hoyland Nether or Nether again as it came to be known!

Trust me Alan I'm asking these things because A) I'm thick as a brick and B) genuinely struggling through a haze of scotch and Tramadol.

Like Blackadder said.

"I wear cotton but don't know how it works".

Is my previous post ok for the word thingy?
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: FIF. Another FORTH.

Post by mrtinb »

Had a little play with the UDG version tonight. The UDG4ZXpand is below the keyboard controller.

A little question though. If I want to add new words with machine code, could you describe how to pass arguments. Are you just using the stack, or is top of stack a register, and which registers should be preserved?

Image
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Moggy wrote: Wed May 26, 2021 10:11 pm You got the D/ and D- is this ok for D* ?


D* (nd1\nd2 ... nd3)
Uses/Leaves
Double number version of '*'


The PAP routines are just standard Forth 79 number formatting routines found in any work on the subject and not special to myself so not needing any explanation I would have thought?
That definition is fine for D*, though it should say "Uses/Leaves 8 4". I'd respectfully disagree and say the PAP ones are the most deserving of documenting for the reason that it's easy enough to work out what it's doing when you look at the source code, but there's no source code if you come across them in a glossary. Anyway, it was just a thought. I'll get round to doing it. It's certainly not urgent. Fear not.

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

Re: FIF. Another FORTH.

Post by Moggy »

Honestly Alan I'm not ducking anything I just don't have the skill set to know how a lot of this works, more of an end user who is bloody grateful for the efforts of those who can do.
roganjosh
Posts: 100
Joined: Thu Jun 14, 2018 12:59 pm

Re: FIF. Another FORTH.

Post by roganjosh »

Moggy wrote: Wed May 26, 2021 10:48 pm Honestly Alan I'm not ducking anything I just don't have the skill set to know how a lot of this works, more of an end user who is bloody grateful for the efforts of those who can do.
No problem Moggy. I've said before that I veer on the side of assuming too much. Mind you, it's a good way of getting people to tell you what level to pitch things at and you haven't insulted anyone in the process.

Alan
Post Reply