Difficulty: Easy
Correct Answer: all of the above
Explanation:
Introduction / Context:
Macro processors expand parameterized templates into concrete assembly code, improving readability and reuse. Toolchain designers choose different integration points for macro expansion depending on performance and complexity requirements.
Given Data / Assumptions:
Concept / Approach:
A macro system need only ensure that by the time symbol resolution and code generation occur, macros have been expanded. This can be done in a distinct one-pass or two-pass macro stage, or embedded in the first pass of a traditional two-pass assembler so that symbols introduced by expansions are properly recorded.
Step-by-Step Solution:
Verification / Alternative check:
Historical assemblers and modern toolchains document each approach (e.g., separate macro preprocessors versus integrated macro facilities in MASM/NASM/AS).
Why Other Options Are Wrong:
Common Pitfalls:
Assuming macro expansion must be a separate preprocessor; overlooking symbol scope and forward reference handling which motivates integration with pass 1.
Final Answer:
all of the above
Discussion & Comments