# Assembly language: Ampersand before a register

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


?

• This seems to be a programming, not an EE question, and would fit much better on StackOverflow, IMHO. – Marcus Müller Aug 26 '16 at 7:37
• @MarcusMüller Questions which are specific to embedded programming are fine here. See this discussion. – Dmitry Grigoryev Aug 26 '16 at 11:08
• @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). – Marcus Müller Aug 26 '16 at 11:29

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.

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.