MOVM.L syntax
Posted: Fri Jun 05, 2015 12:28 pm
Hello.
I've stumbled upon the MOVM.L syntax.
It's a form of MOVEM that is used by GAS in order to push/pop registers on the stack.
I had
I had to come back to the M68000PRM.pdf in order to get it. The manual states that there is a syntax to backup, and a syntax to restore :
pre-decrementSo, registers D2, D3 and A2 will be pushed (saved on the stack).
post-increment
So, registers D2, D3 and A2 will be popped (retrieved from the stack), that makes sense.
I thought it would help ^^
I've stumbled upon the MOVM.L syntax.
It's a form of MOVEM that is used by GAS in order to push/pop registers on the stack.
I had
Code: Select all
movm.l #0x3020,-(a7) ; Backup registers
...
movm.l (a7)+,#0x40c ; Restore registers
pre-decrement
Code: Select all
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3 A4 A5 A6 A7
1 1 1
post-increment
Code: Select all
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
A7 A6 A5 A4 A3 A2 A1 A0 D7 D6 D5 D4 D3 D2 D1 D0
1 1 1
I thought it would help ^^