Skip to content

Feature Request: Output program without pseudo-instructions #243

@timbslr

Description

@timbslr

On the right side of a rule, you can write asm{ ... } to insert another instruction/rule that was already defined somewhere else. I used this to define pseudo-instructions, which are replaced by normal instructions but allow more convenient assembler programming. Here's an example of such a pseudo-instruction I defined:

beqi {imm: i8}, {addr: u16} => asm{ li B, {imm} } @ asm{ beq {addr} }

It would be nice to have a command-line flag that outputs the complete program (not the generated bytes) without pseudo-instructions/a version of the program where all pseudo-instructions are replaced with their corresponding normal instructions. This would help a lot in debugging my current project.

Example:
The program
beqi 12, 0x1234
with the new flag activated should output
li B, 12
beq 0x1234

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions