Datasheet

Table Of Contents
Table 357. Values in
pioasm, i.e. <value>
integer An integer value e.g. 3 or -7
hex
A hexidecimal value e.g. 0xf
binary
A binary value e.g. 0b1001
symbol
A value defined by a .define (see [pioasm_define])
<label> The instruction offset of the label within the program. This makes most sense when used with a
JMP instruction (see Section 3.4.2)
( <expression> ) An expression to be evaluated; see expressions. Note that the parentheses are necessary.
3.3.4. Expressions
Expressions may be freely (boldly?) used within pioasm values.
Table 358.
Expressions in pioasm
i.e. <expression>
<expression> + <expression> The sum of two expressions
<expression> - <expression> The difference of two expressions
<expression> * <expression> The multiplication of two expressions
<expression> / <expression> The integer division of two expressions
- <expression> The negation of another expression
:: <expression> The bit reverse of another expression
<value> Any value (see Section 3.3.3)
3.3.5. Comments
Line comments are supported with // or ;
C-style block comments are supported via /* and */
3.3.6. Labels
Labels are of the form:
<symbol>:
or
PUBLIC <symbol>:
at the start of a line.
TIP
A label is really just an automatic .define with a value set to the current program instruction offset. A PUBLIC label is
exposed to the user code in the same way as a PUBLIC .define.
3.3.7. Instructions
All pioasm instructions follow a common pattern:
RP2040 Datasheet
3.3. PIO Assembler (pioasm) 315