It should work fine if you don't specify a name for endm
. I.e.:
defm waitmacro ;akumulatörü hacılıyor
TYA
mloop DEY
BNE mloop
TAY
endm
I'm not sure why this is the case or why the documentation suggests otherwise.