Shop OBEX P1 Docs P2 Docs Learn Events
Documentation error [Resolved] - Parallax to fix — Parallax Forums

Documentation error [Resolved] - Parallax to fix

evanhevanh Posts: 15,915
edited 2022-08-17 17:04 in Propeller 1

Just got meself a surprise to find an error in the Prop1 datasheet v1.4.0 - https://www.parallax.com/package/p8x32a-propeller-datasheet/

The instruction table, at top of page 23, the TEST instruction is said to set the Z flag when D = 0. This is wrong. The actual effect is when Result = 0.

EDIT: Also, the description should be changed from

AND S with D to affect flags only

to

AND S into D to affect flags only

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2022-08-17 13:18

    It's easy to see how this error crept in, since the test instruction is just an and instruction with the nr and wz modifiers. In an and instruction the destination is result after execution.

    -Phil

  • Thanks @evanh - Submitted for update.

  • @evanh said:
    Just got meself a surprise to find an error in the Prop1 datasheet v1.4.0 - https://www.parallax.com/package/p8x32a-propeller-datasheet/

    The instruction table, at top of page 23, the TEST instruction is said to set the Z flag when D = 0. This is wrong. The actual effect is when Result = 0.

    Good catch!

    The error seems to also be due an indecision on the way prepositions are used: "with" in place of "into".

    And it also affects the next item at the Assembly Instruction Table (TESTN); both are conflicting in that aspect, and cannot be simultaneouslly right.

    IMHO, since neither of those two instructions modify D contents, both would be better explained by the use of "with" at their descriptions, and sure, Z Result-column needs to be equal for them, but as you know, english isn't my first language... :smile:

  • evanhevanh Posts: 15,915
    edited 2022-08-17 13:44

    Huh, TEST does say "with" when the others say "into". The two errors must have been some copy'n'paste hangover that oddly wasn't corrected for this one instruction ... Opening post has been updated with this.

  • I think "with" is more correct than "into" for test. "Into" is a bit misleading since it implies D could be changed. Besides, ANDing is commutative:

    S & D == D & S

    -Phil

  • Thanks @evanh, @"Phil Pilgrim (PhiPi)", and @Yanomani.

    This was probably a copy/paste issue, ultimately. I don't recall if that specific datasheet content came from me, or if I used it as the basis for the Quick Reference, but I also see that the Propeller Quick Reference v1.7 has a similar discrepancy and also a similar problem with TESTN, and TESTN in the manual uses the "into" language where I'd prefer it not to.

    My intention is to use the term "with" instead of "into" since the normal operation of TEST and TESTN is not to store the result into D, and also to make the Z Result field be "Result = 0" instead of "D = 0."

    Again, thanks for catching this!

  • evanhevanh Posts: 15,915

    Cool, thanks.

Sign In or Register to comment.