According to Eyes & Lichty, pp. 466 & 467 (archive.org), the syntax for MVN/MVP is "MVN src, dest":
Assembler syntax for the block move instruction calls for the operand field to be coded as two addresses, source first, then destination — the more intuitive ordering, but the opposite of the actual operand order in the object code. The assembler strips the bank bytes from the addresses (ignoring the rest) and reverses them to object code order.
(Also the assembler is apparently supposed to be accepting full addresses and just implicitly use their bank bytes to form the operands - ca65 does accept it that way - but personally I am fine with the recent switch to immediates.)
So for the instruction:
MVN #$7E, #$C0 ; Move from Bank 7E to Bank C0
64tass should emit the bytes
54 C0 7E
But currently it produces:
54 7E C0
so the source and destination banks are swapped.
Hello!
Looks correct to me:
I have V2.15 ca65 around and there it's reverse but I think they've fixed that back in 2018.
Hi!
Indeed I can acknowledge that it does work as intended. Must have been masked by another issue with my code that I resolved without noticing after planning to open the ticket.
Sorry for the noise, I could have avoided that by double-checking :(