Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pioasm: document predefined constants zero and one #1951

Open
magy00 opened this issue Sep 25, 2024 · 0 comments
Open

pioasm: document predefined constants zero and one #1951

magy00 opened this issue Sep 25, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@magy00
Copy link

magy00 commented Sep 25, 2024

Resubmission of #1862:

Error messages are not obvious. Maybe allow zero and one to be assigned the values 0 and 1, resp., repeatedly.

test.pio:

.program test
.origin 0
_0:
zero:
        jmp skip
_1:
one:
        mov pins, ~pins
skip:

        nop [1]

        out pc, 1       // effectively jmp _0 or jmp _1
$ ~/.pico-sdk/tools/2.0.0/pioasm/pioasm test.pio
test.pio:4.1-4: syntax error, unexpected integer
    4 | zero:
      | ^~~~
test.pio:7.1-3: syntax error, unexpected integer
    7 | one:
      | ^~~

Similar for (obvious?) labels like clear, wait, status, etc., are mistaken as keywords:

test.pio:

.program test
clear:
wait:
status:
block:
$ ~/.pico-sdk/tools/2.0.0/pioasm/pioasm test.pio
test.pio:2.1-5: syntax error, unexpected clear
    2 | clear:
      | ^~~~~
@kilograham kilograham added the documentation Improvements or additions to documentation label Sep 28, 2024
@kilograham kilograham added this to the 2.1.0 milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants