Skip to content

doesn't report duplicate labels as an error #10

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

Closed
jepler opened this issue Feb 25, 2021 · 0 comments
Closed

doesn't report duplicate labels as an error #10

jepler opened this issue Feb 25, 2021 · 0 comments

Comments

@jepler
Copy link
Contributor

jepler commented Feb 25, 2021

This should have given an error because the "forever" label is defined twice.

blink = adafruit_pioasm.assemble("""
.program blink
    pull block    ; These two instructions take the blink duration
    out y, 32     ; and store it in y
    mov x, y
forever:
    set pins, 1   ; Turn LED on
lp1:
    jmp x-- lp1   ; Delay for (x + 1) cycles, x is a 32 bit number
    mov x, y
    set pins, 0   ; Turn LED off
lp2:
    jmp x-- lp2   ; Delay for the same number of cycles again
forever:
    jmp forever   ; Blink forever!
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant