Wiki editing discussion

Page 119/126
112 | 113 | 114 | 115 | 116 | 117 | 118 | | 120 | 121 | 122 | 123 | 124

By Bengalack

Champion (403)

Bengalack's picture

30-07-2021, 21:41

Grauw wrote:

So I would copy the part from the existing description

With "existing description", you mean the one from zilog?

By Grauw

Ascended (10021)

Grauw's picture

30-07-2021, 21:44

No I was referring to the “If the bit is set (= 1 = "PE")” and “(= 0 = "PO")” part. That part at least was clear (assuming it is correct).

Anyway I had already edited my comment to clarify.

Grauw wrote:

A simple explanation is no good if it is incorrect. If the intent is to keep the page simple it could just not elaborate on it at all, and rather state that it is used for parity, overflow and some other things, and refer to other more elaborate documentation. It’s not an important flag for a beginner to know about.

Some comments on your text, because the syntax for the flags is PE/PO (parity even/odd) I would consider parity the primary function of the flag, and start with that description rather than overflow.

Also when the flag is not used for parity I never remember whether PE or PO means that the flag is set. So I would indicate whether PE or PO refers to the flag being set, and additionally, explicitly mention whether PE or PO indicates overflow and BC reaching zero.

By Grauw

Ascended (10021)

Grauw's picture

30-07-2021, 22:13

I think something may have gotten lost in translation in the original explanation in the wiki.

Quote:

Bit 2, PF/VF, Parity flag. This is copy of the results least significant bit. If the bit is set (= 1 = "PE") the parity is even otherways the result is odd (= 0 = "PO"). On some cases this bit might be used to indicate 2-compliment signed overflow.(VF) Note that this flag can be used only with conditional JP-instruction.

In the sentence “This is copy of the results least significant bit.” (spelling errors aside), the most obvious interpretation is that “the result” refers to the result of the operation that generates the flag, which is clearly incorrect. However if “the result” refers to the parity’s 1-bits count, which it doesn’t clearly state, then that does not match up with the later statement that PE (even) is 1 and PO (odd) is 0, since the least significant bit of an odd number is 1.

So if I squint I can see the intent of the explanation Smile, but it misses the mark.

By Grauw

Ascended (10021)

Grauw's picture

30-07-2021, 22:13

I notice the article also lists the undocumented “XF” and “YF” flags. I’m not even sure the explanations (“copy of the 3rd and 5th bit”) are true for all relevant Z80 variants, neither does it say which operations yield these results or how to test for it. If you ask me this is excellent material for a “The Undocumented Z80 Documented” paper, but not for dummies Smile.

By Bengalack

Champion (403)

Bengalack's picture

31-07-2021, 08:41

Grauw wrote:

It’s not an important flag for a beginner to know about.

Personally I've never used it until now, but it is probably because it has not been clear to me what it does. It actually isn't that mysterious as I thought, and you need it if you want to do signed comparisons I think. A case which doesn't sound too exotic?

Grauw wrote:

I would consider parity the primary function of the flag, and start with that description rather than overflow.

Ok, I wouldn't know which case is more used, but personally I had to do a 16-bit signed comparison, and I had to use this flag. Never had any use of PF.

Anyways, I gave it a go and updated the text. Yes, there is a bit more text than for the other flags, but I focused on the two main things: Parity and Overflow. Tried to make it clearer and point out that this flag is used in 16-bit context as well, and not only 8-bit as is mentioned in the section in the z80 manual.

I find it strange that the section in the z80 manual mention that only the Accumulator affects the flag when ADC/SBC with 16-bit operands clearly also affects it.

By gdx

Enlighted (4641)

gdx's picture

31-07-2021, 10:42

Grauw wrote:

I notice the article also lists the undocumented “XF” and “YF” flags. I’m not even sure the explanations (“copy of the 3rd and 5th bit”) are true for all relevant Z80 variants, neither does it say which operations yield these results or how to test for it. If you ask me this is excellent material for a “The Undocumented Z80 Documented” paper, but not for dummies

Many things have been added indeed. I haven't read everything yet but what is important is to explain the general operation. If we have to talk about internal or undocumented registers, why not if not, it should be removed.

By gdx

Enlighted (4641)

gdx's picture

09-08-2021, 01:20

Mars2000U, You put a lot of information on the instructions added by third-party programs but you often do not indicate if they were commercial or free and how to get them in this case. Why not put the free versions in the downloads with a link in the wiki? It would be easier.

By mars2000you

Enlighted (5968)

mars2000you's picture

09-08-2021, 08:27

Are you speaking about MSX-BASIC extensions or MSX-DOS tools?

In the first case, it's ALWAYS mentioned (Official Software or SceneTools). In the second case, I've maybe forgotten that for a few tools (you could give a few examples at least !!!!).

It is difficult for old products to know their current status when they are not Official Software. I don't want problems with the copyright rules of the site. You are of course free to add links, but personally I will not do that when the downloads are not yet available on MRC or a current author's website.

By gdx

Enlighted (4641)

gdx's picture

09-08-2021, 09:51

MSX-BASIC extensions but it's also available for MSX-DOS tools. Then, official Software and SceneTools is not the same thing than commercial software and freeware. I do not see what makes you afraid to put a freeware in downloads.

By mars2000you

Enlighted (5968)

mars2000you's picture

09-08-2021, 10:07

You have cases where products are freeware but that the authors don't want that their products are available outside of their own sites. The best option is always that the authors submit themselves their products to MRC. I still have in memory big wars about copyright issues here in the past.... Too much wasting time, so I stay outside of that, also in the Wiki.

Page 119/126
112 | 113 | 114 | 115 | 116 | 117 | 118 | | 120 | 121 | 122 | 123 | 124