10
Since the inline assembler of cc65 doesn't accept anonymous labels (from my other answer), another approach is to provide a unique suffix to the labels, which can be applied by the macro. The stringizing operator of the C preprocessor, and the fact that C string literals written consecutively are automatically concatenated, might make this more convenient:
#...
3
You can use anonymous labels in ca65. The equivalent to your example code using these, but without the C wrapping, would be:
CMP #$60
BCC :+
AND #$DF
BNE :++
: AND #$3F
:
You can also use :- to refer to an anonymous label preceding the current position. Increasing the number of + or - symbols increases the number of anonymous labels to skip over.
...
Only top voted, non community-wiki answers of a minimum length are eligible