1
\$\begingroup\$

I'm trying to program the Programmable Realtime Units (PRU) on my Beaglebone Black in assembly language. Here is the instruction set, which comes in two flavors: pasm and clpru (I'm using pasm).

What does it mean when a register name has an ampersand (&) before it? For example:

// Copy 8 bytes from r2/r3 to the memory address r1+5
sbbo &r2, r1, 5, 8

How is this different than just

sbbo r2, r1, 5, 8

?

\$\endgroup\$
  • \$\begingroup\$ This seems to be a programming, not an EE question, and would fit much better on StackOverflow, IMHO. \$\endgroup\$ – Marcus Müller Aug 26 '16 at 7:37
  • \$\begingroup\$ @MarcusMüller Questions which are specific to embedded programming are fine here. See this discussion. \$\endgroup\$ – Dmitry Grigoryev Aug 26 '16 at 11:08
  • 1
    \$\begingroup\$ @DmitryGrigoryev ah, thanks. Clearly, this is one of these questions on the boundary between the SO and the ee.SE communities :) I still think this is less about embedded than understanding the assembler language on its own, but I can certainly see why it's asked here. That's why I commented, but did not flag (IIRC). \$\endgroup\$ – Marcus Müller Aug 26 '16 at 11:29
1
\$\begingroup\$

From the instruction set provided in the link it is evident that

sbbo &r2, r1, 5, 8

is the only supported in clpru assembler. But in pasm

sbbo r2, r1, 5, 8

is also supported. So, in pasm they are same. But if clpru was used only the first syntax would work.

\$\endgroup\$
0
\$\begingroup\$

My guess is it does just what the comment says. With the & it copies the content of the register (plus the next one up since 8 bytes are specified). Without the & it copies data from memory at the address specified by the value in the register.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.