Skip to content

doesn't report duplicate labels as an error #10

Closed
@jepler

Description

@jepler

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!
""")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions