Shop OBEX P1 Docs P2 Docs Learn Events
SX/B - Defining constants as negative (two's compliment) — Parallax Forums

SX/B - Defining constants as negative (two's compliment)

Mike CookMike Cook Posts: 829
edited 2006-09-22 22:47 in General Discussion

Having a really basic problem here.

I'm defining a constant as a negative (two's compliment) number:

CDT CON -5 ' Central Daylight Time

When I compile the code and do a <CTRL _L> it compiles as:

185 =00000005 CDT EQU 5 ;CDT CON -5 ' Central Daylight Time

Shouldn't it compile as:

185 =00000005 CDT EQU 251 ;CDT CON -5 ' Central Daylight Time

Thanks,

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike

Comments

  • BeanBean Posts: 8,129
    edited 2006-09-21 13:51
    Mike,
    Sure, wait until I post version 1.51.02 and THEN find a bug.
    I'm just kidding of course. Thanks for posting it.

    I will look into correcting that.

    In the meantime you can use:
    CDT CON 0-5
    or
    CDT CON 256-5


    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    There are only two guaranteed ways to become weathy.
    Spend less than you make.
    Make more than you spend.
    ·
  • Mike CookMike Cook Posts: 829
    edited 2006-09-21 14:40

    Well that just means if people are finding bugs they are using it (SX/B)!

    Great compiler once you learn the rules, I'm still LEARNING!

    Thanks


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • cbmeekscbmeeks Posts: 634
    edited 2006-09-21 14:47
    It also means that SX/B will become more stable. Ahhh...the power of the people.

    cbmeeks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Coders' Hangout
    A place for programmers to hangout!
    http://www.codershangout.com

    METROID?
    Metroid Classic
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-22 22:47
    Well you guys have to appreciate the fact that Bean is right there to field the issues and identify the bugs.· Let's give him a hand for being such a active developer!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.