SX/B - Defining constants as negative (two's compliment)
![Mike Cook](https://forums.parallax.com/uploads/userpics/760/nOXTNQ7SE5KSC.jpg)
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
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.
·
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
cbmeeks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Coders' Hangout
A place for programmers to hangout!
http://www.codershangout.com
METROID?
Metroid Classic
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support