The 8086 processor uses microcode, implementing most machine instructions through a sequence of simpler micro-instructions. These micro-instructions can use the M and N registers to access registers specified in the instruction. This microcode exchanges two registers.
Each micro-instruction includes a register move between a source and destination register. The micro-instruction can specify the 5-bit code directly, or use the M and N registers for indirection. This way, microcode doesn't need to know which registers an instruction specifies.