Language…
16 users online: Ahrion, BearAndBoarFan, Darkanine, elusive, GrenCarret, Hayashi Neru, Koopster, MegaSonic1999, metronia,  quietmason, rafaelfutbal, Ringo, Sokobansolver,  Teows, The Cursed Goomba, ZAGESAW - Guests: 77 - Bots: 179
Users: 55,612 (2,430 active)
Latest user: arsosa

Is it considered bad form to use reserve instruction WDM / Opcode $42?

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:
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.
it'll also confuse debuggers because most of them have the option to break on WDM, which is actually pretty useful for simple breakpoints

also yeah asar automatically adds a 2nd byte to a plain WDM so you need to use db $42 to use that trick