I did have a thought: you could do right shifts with MPY and XBA. For example, getting bits from position $0F00 into position $003c would be
Code: Select all
XBA
LDA #$0400
MPY
XBA
Code: Select all
LSR #6
Code: Select all
LDX #6
TXD
LSR
LDX #1
TXD
For my modifications, it makes the shifter somewhat less attractive, because I don't offer read-modify-write addressing modes. For your approach with the shift distance in the opcode, the shifter is much more valuable.
For your
Code: Select all
LSR #12
Code: Select all
ROL
ROL
ROL
ROL
ROL
In any case, it's probably worth writing a macro for multi-bit shifts, so you can use multiple instructions for as long as you have to, and then switch to new opcodes when that becomes possible. And your code becomes more compact and readable.
Cheers
Ed