LDR R0, R6, #3 ; load the value of x ADD R1, R6, #4 ; put the base address of grid into R1 ADD R1, R0, R1 ; calculate address of grid[x] LDR R2, R1, #0 ; grid[x] ADD R2, R2, #2 ; grid[x] + 2 LDR R0, R6, #3 ; load the value of x ADD R0, R0, #1 ; x+1 ADD R1, R6, #4 ; put the base address of grid into R1 ADD R1, R0, R1 ; calculate address of grid[x+1] STR R2, R1, #0 ; grid[x+1] = grid[x] + 2;