Closed Awuwunya closed 3 years ago
That is by design: labels defined in macros are not exported by default in AS, but it can be toggled by the GLOBALSYMBOLS/NOGLOBALSYMBOLS macro atributes. The label pseudoinstruction was added to AS to allow selective exporting of labels, so it is also not a workaround.
ok yeah that is not very intuitive especially coming from ASM68K where macro local labels are defined in the label scope. That does bring its own issues to be fair, but its how I handled stuff in AMPS anyway because of the extensive use of macros
I had this issue with porting AMPS to AS. Labels would just kinda... not work? I would have a nested macro (code -> macro -> macro) that created labels that would be referenced by code within another macro. However, these labels apparently didn't exist! I found a workaround by using the label directive, but it was still a weird bug. Here is the working example: