Shop OBEX P1 Docs P2 Docs Learn Events
SXB 2.0 bug using NOT — Parallax Forums

SXB 2.0 bug using NOT

Peter VerkaikPeter Verkaik Posts: 3,956
edited 2009-02-13 15:44 in General Discussion
Bean,

The simple statement __param4 = not __param2 compiles into

·· 145· =00000014······ MainLoop:······················· ;MainLoop:
·· 146·················
·· 147· 0014· 024B······· MOV W,/__PARAM2··············· ;· __param4 = not __param2
·· 148·················
·· 149· 0015· 0010······· JMP @MainLoop················· ;· goto MainLoop
······· 0016· 0A14

There is a missing MOV __PARAM4,W


regards peter

Comments

  • mojorizingmojorizing Posts: 249
    edited 2009-02-13 14:28
    "NOT" is bitwise, try "-" (negate) with a byte

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bad spellers of the world untie!
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-02-13 14:35
    Same result.
    What does work is
    ·w = not __param2
    ·__param4 = w

    as a workaround for now.
    I think this bug originates from an earlier bugfix
    where a MOV W,W had to be removed.

    regards peter
  • BeanBean Posts: 8,129
    edited 2009-02-13 15:44
    Peter,
    Thanks for catching that. I screwed up when I added the code to support "W" in 2.00.09. I will post version 2.00.11 today with the fix.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
Sign In or Register to comment.