Searching \ for '[SX] Twos-Comp Negative Numbers in Data Statements' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/lib/mem/index.htm?key=data
Search entire site for: 'Twos-Comp Negative Numbers in Data Statements'.

Exact match. Not showing close matches.
PICList Thread
'[SX] Twos-Comp Negative Numbers in Data Statements'
2008\02\01@122653 by Zootn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote:

In the current SX/B release, the following compiles and programs, but the values compiled to .src are INCORRECT:


DATA -1 ' would think it would compile to $FF, but does not
' etc

This does compile to correct value:


foo CON -1
DATA foo

From SX/B doc...

WDATA/DATA
Creates a table of data values for use with the READ instruction.
. Label  is the symbolic name for the table and serves as a pointer to the location of table index zero.
. Const  is any constant (byte, ASCII character, or computed value).


...which would lead me to believe the first example should work.

Not a big deal, but this threw some havoc in into some "negative" servo offsets I was using in a data table.

Until I closely examined the .src output, I didn't catch that my code was fine, but the compiled data was not. Have not had a chance to check out in the beta SX/B yet.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=247265
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\02\01@134142 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

Zoot,
 This is fixed in the beta version.
 Thanks for pointing it out, I'll add it to the download thread.

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=247265#m247282
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...