Feature Request
Component: ca45 (45GS02 Assembler)
Description:
Add support for nested macro definitions and invocations in the ca45 assembler.
Currently, ca45 supports basic macro definitions via the preprocessor, but does not support macros defined within other macros (nested macro definitions) or macros that invoke other macros at multiple levels of nesting.
Use Case:
Complex assembly routines often benefit from hierarchical macro abstractions. For example:
- Define a base macro for common operations (e.g.,
push_regs)
- Define specialized macros that call the base macro multiple times
- Allow parameterized macros to generate other macro invocations at compile time
Example Desired Syntax:
.macro push_regs_and_save_zp
pha
phx
phy
.endmacro
.macro setup_environment
push_regs_and_save_zp ; nested macro invocation
; additional setup code
.endmacro
Implementation Considerations:
- Ensure macro parameter expansion works correctly across nesting levels
- Prevent infinite recursion with reasonable nesting depth limits or cycle detection
- Maintain backward compatibility with existing single-level macros
- Consider performance impact on assembly time
Related Documentation:
Priority: Medium (performance/code organization improvement)
Feature Request
Component: ca45 (45GS02 Assembler)
Description:
Add support for nested macro definitions and invocations in the ca45 assembler.
Currently, ca45 supports basic macro definitions via the preprocessor, but does not support macros defined within other macros (nested macro definitions) or macros that invoke other macros at multiple levels of nesting.
Use Case:
Complex assembly routines often benefit from hierarchical macro abstractions. For example:
push_regs)Example Desired Syntax:
Implementation Considerations:
Related Documentation:
Priority: Medium (performance/code organization improvement)