Yes. pio_add_program() returns the offset at which your program has been loaded, so you just add that to your label when using it.Regarding the 'origin' statement, isn't that the case with .wrap too? The assembler generates code to add the loaded offset to the wrap statements, so presumably I can just add my offset to the label as well. In any case, it works for the purpose I had in mind.
Useful for things like:
Code:
pio_sm_exec(pio, SM_NO, pio_encode_jmp(offset + my_label));
Statistics: Posted by arg001 — Sat Mar 02, 2024 5:07 pm