Searching \ for '[SX] Problem with SX/B Compiler' 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/languages.htm?key=sx
Search entire site for: 'Problem with SX/B Compiler'.

Exact match. Not showing close matches.
PICList Thread
'[SX] Problem with SX/B Compiler'
2007\11\01@071625 by Fe2o3Fishn/a

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

A simple little program as follows:


001 DEVICE          SX28, OSC4MHZ, TURBO, STACKX, OPTIONX
002 FREQ              4_000_000
003 ID                  "Foo"
004
005 Program                Start
006
007 LED1        VAR        RB.0
008
009 FOO        VAR        BYTE
010
011 Start:
012   FOO = 165
013   RANDOM FOO
014
015 Main:
016   LED1 = FOO & 1
017   PAUSE 500                                        ' delay
018   RANDOM FOO
019   GOTO Main                                        ' repeat forever
020
021  END

Compiling with SX-Key v3.2.3 (the latest version, under Windows XP) comes up
with this error message:
foo.SXB(54)Line 16, Error 16, Pass 1: UNKNOWN COMMAND "LET".

Oh really???   I thought it might be the LE in LED1 bringing up the "LET"
so I changed all LED1's to LAD1 and I get  the same error message.  
The SX/B compiler seems to be a little loose on compiling as I've had
other strange things happen like undefined variables being permitted by the
compiler only to have the assembler burp on an undefined symbol called
(which I don't use in my code).   I'll report them when I find 'em as I start my
adventure into SX/B coding.

What's up?

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

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

2007\11\01@074237 by JonnyMacn/a

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

You're attempting to move a byte (result of FOO & 1) into a bit -- can't do it (PBASIC masks this by moving bit zero of the result which is probably what you want).  Logically, your program could be:

Led1 = foo.0
... because any bit ANDed with 1 will remain unchanged, therefore you can simply copy the target bit to the output LED.

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

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

2007\11\01@075932 by beann/a

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

Jon is correct. You cannot assign a larger variable type to a smaller variable type.

Please DO post any errors you get with the compiler. We will try to explain and/or correct them.

Bean.

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

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

2007\11\01@084422 by Fe2o3Fishn/a

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

Okey dokey.  When I get home tonight I'll dig up the (I now know INCORRECT code)
that generated the message about an undefined symbol, .
Still, that error message sure could be a tad more informative.  :-\
Let me take this a little further -- how would I assign the low three bits of 'foo' to the
low three bits of an I/O port, say RB?

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

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

2007\11\01@085157 by JonnyMacn/a

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

Well, you could do this
RB = foo & %00000111 or, if you didn't want to disturb the other bits of RB, then:

RB.0 = foo.0
RB.1 = foo.1
RB.2 = foo.2 or, here's another way:

tmpB1 = foo & %00000111
RB = RB & %11111000
RB = RB | tmpB1
---------- End of Message ----------

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

2007\11\01@091612 by Fe2o3Fishn/a

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

OK, those certainly make sense.  Wuz thinkin' that there might be
a SX/B-specific syntax for doing the three bits.

(note to self: think RISC when doing SX/B programming)
Thanks John^H^Hn!    :-)
---------- End of Message ----------

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

2007\11\01@095629 by JonnyMacn/a

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

Yes, SX/B is very close to the machine, and if you think that way you will be rewarded with high performance and quick development cycles.

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

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

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