Hello! I am having trouble with my program where I have to store data into RAM. We are to take the sum of numbers spanning from 1 to num and store the result into a RAM location. Whenever I make an attempt I get this error: *** error 65: access violation at 0x0000009C : no 'write' permission
I have tried changing my code from READONLY to READWRITE but that did nothing. I tried storing to a different RAM address and that did not work either. I could use some help and here is my code:
num EQU 0x3 GLOBAL user_code AREA lab6, CODE, READONLY ENTRY user_code
LDR R0, =num
MOV R1, #0x0
BL TASK1
TASK1
ADD R1, R1, #1 ;Incrementing index
ADD R2, R1, R2 ;Add #s 1 through num
LDR R3, =sum
STR R2, [R3]
CMP R0, R1 ;Branch if R2 != num/Exit if equal
BNE TASK1
STOP B STOP
sum DCD 0x40000000
END