In assembler, what does line (r3) + do?
I have multiple lines in the assembly and I should be able to answer that this is an effective address (EA). Line...
(R3) +
+ (R2)
What are the plus signs doing here? I know (R3) will have EA = [R3], but I don't understand the + signs and can't find the answer anywhere. Thank.
Assembly language - NIOS II
source to share
This notation is common in assembly code on machines that do register indirection, originally the PDP-11, but these days I think there are many DSPs.
Which means (Rn) is usually "indirectly using the address in register N".
Which means (RN) is usually "add one (storage unit) to register N and then jump indirectly using the address in register N". Which means (RN) + means "touch the address in register N, and when done add one (storage block) to register N". - (RN) and (RN) - are analogs that "subtract one (block of memory)".
The designation, IIRC, was originally used on the PDP-11 in the early 1970s, and the variant migrated to C as combinations of the ++, - and * operators.
The PDP-11 also allows register offset addressing, such as "k (RN)". DSPs may or may not allow this.
Yes, the details should be easily found in any device programming manual.
source to share