Example Problem:
Refer the manual (pp. 232) for MOVEM instruction. Disassemble the following instruction.
4CDF 0F24
Binary: 0100 1100 1101 1111 0000 1111 0010 0100
10th bit is 1 so memory to register
6th bit is 1 so long transfer
Effective Address: 011 111 --> (An)+
Therefore, we can assume
MOVEM.L (Sp)+, _____
This is where I get stuck.
I'm not quite sure how to convert 0F24. The answer states that the registers being moved are A0/A1/A2/A3/D2/D5, but how do you get this answer?
You have 16 bits and each bit corresponds to one of the 16 registers D0-D7/A0-A7
. The order of the bits depends on the address mode. Usually, and in your case:
0000 1111 0010 0100
^... ...^ ^... ...^
`-A7 | `-D7 `-D0
`-A0
In pre-decrement mode, the bitorder would be reversed.