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

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

Open
pizzatari opened this issue Oct 26, 2021 · 0 comments

Comments

@pizzatari
Copy link

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
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