martinpiper/ACME

Warning for 65c02 opcodes ply, phy, plx, phx treated as labels when targeting 6502

Closed this issue · 2 comments

Would be nice if there was an option to warn when using unsupported (extension) opcodes which don't have an argument.

Unsupported opcodes with arguments do trigger an error, since it is a syntax error, however opcodes without arguments (eg. phy, ply, phx, plx) can slip through.

I understand it shouldn't be an error, as it's valid. But, an option for a warning for specific keywords would be a nice addition.

"plx" would generate the warning: Warning - File Test.a, line 27 (Zone ): Implicit label definition not in leftmost column.

It's treated as a label definition in the wrong column. I can add a command line option to make that warning reported as an error if you like?

Sorry, I was working on a minimal example at the time where all the code was in the leftmost column, so it was being treated as a label with no warning. I think it's ok to treat this issue as invalid.