dasm-assembler / dasm-assembler/dasm
Macros detects parameters in the false portion of #if/#else/#endif and IF/ELSE/ENDIF directives
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 257
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the supplied test.asm examples for #if/#else/#endif and IF/ELSE/ENDIF, then trace conditional handling and macro parameter validation. Done means parameters in inactive branches no longer trigger a missing-argument error, while the examples still assemble correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100