Skip to content

ASAR 1.91 "CBNE $00+x,$00", "CBNE $00,$00", and "DBNZ $00,$00" do not compile when using a .branch label and do not give an error. #388

@JaredBrian

Description

@JaredBrian

Sorry if this has been listed as an issue somewhere already. I looked, but I couldn't find an already existing issue for this bug.

The following examples do not compile when using a .branch label, but work just fine if you manually specify the relative manually. They do not output any error when compiling, and Asar only outputs the usual "Errors were detected while assembling..." message and nothing more.
"CBNE $00+x,$00", "CBNE $00,$00", and "DBNZ $00,$00" were the only 3 that I could find that behave this way. I only tested this on 1.91.

This does not work and does not give any error:

mov.b A, $01 : cbne.b $00+X, .branch
    mov.b Y, #$00

.branch

This DOES work just fine:

mov.b A, $01 : cbne.b $00+X, $02 ; .branch
    mov.b Y, #$00

.branch

These examples also do not work:

mov.b A, $01 : cbne.b $00, .branch
    mov.b Y, #$00

.branch
mov.b A, #$00
mov.b Y, #$0F

.loop

    inc A
dbnz Y, .loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions