Skip to content

Macros detects parameters in the false portion of #if/#else/#endif and IF/ELSE/ENDIF directives #123

Open
@pizzatari

Description

@pizzatari

The assembler detects a parameter inside #if blocks when it's the false portion and issues an error if a parameter is not passed. I think it should ignore {n} parameters in the false block.

dasm test.asm -otest.bin
test.asm (12): error: Not enough args passed to Macro.

Unrecoverable error(s) in pass, aborting assembly!
Complete. (5)

Samples:

    processor 6502

    ORG $1000

    MAC MAC_TEST
#if 0
label{1}label
#endif
    ENDM

    MAC_TEST

And

    processor 6502

    ORG $1000

    MAC MAC_TEST
    IF 1
    ELSE
label{1}label
    ENDIF
    ENDM

    MAC_TEST

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