Question

I'm learning assembly language (m68000).

I don't understand the following syntax

move.l p, -(A3)

What's the difference between this and the following?

move.l p, (A3)
Était-ce utile?

La solution

They are different versions of Address Register Indirect addressing mode, however, the first one has a pre decrement.

This addressing mode specifies the operand in memory, the address of which is specified by one of the address registers. Before the operand is used, the value in the address register is decremented according to the size of the operand.

Source

So the difference in your example is that the address stored in the A3 register would be decremented by 4 (the size of the operand, long word) before p is copied into it.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top