Just to make it clear, all instructions in immediate mode that work on A can take one more byte if the M flag is clear right ? and the same for X/Y and the X flag ?
If so it would be nice to have the instructions table in the document appear as they are named in the adressing mode table so that for example for BIT it would be written "ImmediateMemoryFlag" instead of just "Immediate" or maybe "Immediate (M)" the bytes column could also show "3/4" instead of just 3 to make things perfectly clear.
It would be. I guess they figure it's implied because that's what the M flag does. But yeah I agree it should be clarified in ref docs.
Also, these are the only case where the instructions can take more bytes right ?Every immediate mode instruction
can be 2 or 3 bytes large depending on M/X flags. The only
exceptions are SEP/REP which are always 2 bytes (and I guess BRK/COP if you count those -- but most docs list those as implied mode).
Non-immediate mode instructions are always fixed size. Though they may behave differently depending on M/X flags.
It's worth noting that the M/X flags have other implications besides just the size of the instruction. M, for example, effects how many bytes are written to memory on STZ. And M/X change how many bytes are pushed on PHA/PHX/PHY. Etc.