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?

Postby yzoer » Fri Jun 17, 2016 4:44 pm

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

Postby Ross » Fri Jun 17, 2016 6:10 pm

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

Postby yzoer » Fri Jun 17, 2016 8:59 pm

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

Who is online

Users browsing this forum: No registered users and 2 guests