mov 8[+r1], 1337
Edit, after having read the recommended thread of dwelch I get to (assuming I understood it right):
add #8, r1
mov #1337, r2
mov [r1], [r2]
sub #7, r1
Is this correct or did I do mistakes?
Info we had about the assembler:
n[+rx]
register indexed with pre-increment;n
is index value andrx
is registerx
rx
register directly addressing[rx]
register indirect addressing#n
immediate addressing
We may only use add, sub, mov
. Except for r1
we may additionally modify r2
if necessary.
I hope I did it correctly?