informedcitizenry / 6502.Net

A .Net-based Cross-Assembler for Several 8-Bit Microprocessors
MIT License
58 stars 17 forks source link

Underscore labels not working in macro arguments #11

Closed svallee-dev closed 2 years ago

svallee-dev commented 2 years ago

I have a bit of code mutation going on in my project, which requires me to pass the address of code into a macro. It used to work when I passed underscore-prefixed labels (local scoped labels), but it's not working anymore.

Example of my code:

Screen Shot 2021-11-26 at 4 02 56 PM

Error: Symbol "_hackReadAddr_d" is not defined.

I can easily fix it by removing the underscores and it works again, but making these labels global is of course not ideal.

Thanks!

informedcitizenry commented 2 years ago

I think it might something in your macro. I tried it myself with something like this and it worked fine:


foo .macro bar
    ldx \bar
    .endmacro

_bazz_bazz_
    lda $dead, y
    .foo _bazz_bazz_
informedcitizenry commented 2 years ago

I believe this is fixed now, can you confirm?