dasm-assembler / dasm-assembler/dasm

Macro # arguments

Open
#111 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
257
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Would be useful to me for macros to have access to the # of arguments passed.
This would allow conditional parameters, effectively.

 MAC WHICH
  jsr {1}
  IF {#} > 1
    jsr {2}
  ENDIF
ENDM
; usage
 WHICH one
 WHICH one,two

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing how macro arguments are parsed and expanded, then determine how the example's {#} value should be exposed to conditional parameters. Done means the WHICH example can distinguish one argument from two.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.