What is the difference between these instructions:
-Add (R0), R3
-Add R0, (R3)
And why has the place of ()
been changed?
What is the difference between these instructions:
-Add (R0), R3
-Add R0, (R3)
And why has the place of ()
been changed?
You don't indicate the processor architecture, which can make a really big difference.
That said, your question can easily be answered by reading the documentation for your assembler. Based on how every other assembler I've used works, my expectation would be one of the following:
They are not different; the parentheses have no actual impact.
The parentheses are being used much like square brackets are typically used in an assembler to dereference the register to a memory address(also known as indirect addressing). This would mean that one instruction dereferences R0 while the other dereferences R3.
You should be able to determine which of these is the case by assembling this code in memory and stepping through it while watching the register values.