Shop OBEX P1 Docs P2 Docs Learn Events
CMPSUB oddity — Parallax Forums

CMPSUB oddity

BradCBradC Posts: 2,601
edited 2008-08-18 23:34 in Propeller 1
This is an odd one...

The manual lists CMPSUB as having the R bit clear by default, meaning it won't write the result.
The compiler sets the R bit by default and requires an "nr" effect to clear it..

        org
        cmpsub a,b
a long 0
b long 0





generates. E0 BC 04 03
with the "nr" it generates E0 3C 04 03 .. as it should..

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!

Comments

  • CJCJ Posts: 470
    edited 2008-08-17 15:34
    I suspect the manual is where the error is, as without the r bit set it is no longer a cmpsub and becomes a compare only

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax Forums - If you're ready to learn, we're ready to help.
  • kuronekokuroneko Posts: 3,623
    edited 2008-08-18 00:56
    It's definitely a documentation issue. The "Propeller Manual" lists it as not-written, the "Quick Reference" and the Prop datasheet as written.
  • mirrormirror Posts: 322
    edited 2008-08-18 02:12
    If you download the errata for the manual, then you'll find the correction to this and several other items of error in the Propeller Manual.

    http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PMv1.0Supplement-v1.3.pdf
    ·
  • BradCBradC Posts: 2,601
    edited 2008-08-18 07:43
    Thanks for the pointer mirror, the errata documents every other oddity I've picked up thus far..
    I wonder if there is any plan to fold this stuff into a manual revision ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2008-08-18 23:34
    BradC said...
    Thanks for the pointer mirror, the errata documents every other oddity I've picked up thus far..
    I wonder if there is any plan to fold this stuff into a manual revision ?

    Yes indeed there is! The author is writing additions and corrections at this very moment, and work on the production files is scheduled to begin in a few weeks.·If you have any feedback that has NOT been addressed in the Supplement & Errata, please send it to me at editor@parallax.com.

    Thanks much,

    -Stephanie Lindsay
    Editor, Parallax Inc.
Sign In or Register to comment.