Code:
dest EQU 0x40000000
AREA name, CODE, READONLY
ENTRY
MOV r0, #2
LDR r1, =dest
STR r0, [r1]
stop B stop
END
This code writes the value of 2 to memory location 0x40000000. When I change this to 0x20000000, 2 fails to get written there. Same thing with 0x3FFFFFFF. When I set the memory location to 0x40003FFF, 2 gets printed onto that location, but when I change the address to 0x40004000, 2 fails to get printed there. Same thing for any address locations higher, like 0x50000000. So according to these outputs, it seems like STR only writes values onto a finite range of memory between 0x40000000 and 0x40003FFF.
Does anyone know why this is the case? Or is there something wrong with my code? I am using Keil uVision5, NXP LPC2140.