Before I decide to submit anything that takes advantage of it, I was wonder if it is considered a poor programming practice to use the reserved opcode "WDM". For those who don't know, opcode $42 is technically "reserved", which means it isn't used for anything. Essentially it acts like a NOP instruction with one key difference: WDM accepts a second byte, which it reads, but does nothing with. That means that, if put before a 1 byte instruction, it will "skip" over said instruction.
It could be used in a code like this:
Although I don't know if ASAR accepts WDM properly on its own like that, so I write the notably more ugly code
I would understand if the community frowns upon its use -- it is obscure, not often useful and only saves one cycle and one byte over its alternative "BRA $01". I was just wondering because I had not seen it even mentioned before I started closely studying the technical documents on 65c816 ASM.
It could be used in a code like this:
Code
; .. something something BPL + SEC WDM + CLC
Although I don't know if ASAR accepts WDM properly on its own like that, so I write the notably more ugly code
Code
BPL + SEC db $42 ; Skip the next instruction + CLC
I would understand if the community frowns upon its use -- it is obscure, not often useful and only saves one cycle and one byte over its alternative "BRA $01". I was just wondering because I had not seen it even mentioned before I started closely studying the technical documents on 65c816 ASM.