After stumbling over the old problem of passing a constant as an address instead of a value (i.e. I wrote LDA CONSTANT_VALUE instead of LDA #CONSTANT_VALUE, I need to ask:
Is there a way for the compiler/asembler to force a special character for address access?
What I mean is that I want LDA VALUE and LDA 1 to be a syntax error. I want to be forced to write LDA #VALUE and LDA #1 for a value access and something else, for example LDA &VALUE and LDA &1 for an address access.
This way the error cannot happen anymore. Because it's unlikely that I confuse # and &. But using a constant as an address instead of a value, this happened to me so many times now.
Is there a way to force this in CA65?
Is there a way for the compiler/asembler to force a special character for address access?
What I mean is that I want LDA VALUE and LDA 1 to be a syntax error. I want to be forced to write LDA #VALUE and LDA #1 for a value access and something else, for example LDA &VALUE and LDA &1 for an address access.
This way the error cannot happen anymore. Because it's unlikely that I confuse # and &. But using a constant as an address instead of a value, this happened to me so many times now.
Is there a way to force this in CA65?