Datasheet

Table Of Contents
3.3.2. Values
The following types of values can be used to define integer numbers or branch targets
Table 374. Values in
pioasm, i.e. <value>
integer An integer value e.g. 3 or -7
hex
A hexadecimal 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.3. Expressions
Expressions may be freely used within pioasm values.
Table 375.
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.2)
3.3.4. Comments
Line comments are supported with // or ;
C-style block comments are supported via /* and */
3.3.5. Labels
Labels are of the form:
<symbol>:
or
PUBLIC <symbol>:
at the start of a line.
RP2040 Datasheet
3.3. PIO Assembler (pioasm) 339