outshr in xc? Topic is solved

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
yzoer
XCore Addict
Posts: 133
Joined: Tue Dec 15, 2009 10:23 pm

outshr in xc?

Post by yzoer »

Hi all,

Long time no see! Quick question: Is there any way that XC compiles code to use outshr? I.e. if I have a 32-bit integer and push that to a port 4- or 8 bits at a time (in sequence) that it'll compile it into a series of outshr commands?

Reason I'm asking is that I'd like to create a project completely in XC rather than assembly to make it easier to understand for everyone.

Thanks!
Yvo


View Solution
User avatar
Ross
XCore Expert
Posts: 768
Joined: Thu Dec 10, 2009 9:20 pm

Post by Ross »

The syntax for "out shift right" in XC is

Code: Select all

    p <: >> y;
Not something I use very often anymore!
yzoer
XCore Addict
Posts: 133
Joined: Tue Dec 15, 2009 10:23 pm

Post by yzoer »

Good stuff! Thanks for that! It's literally been years since I touched XMOS devices but I'm working on a project that actually could benefit nicely from it :-)

-Yvo