1769 assembly language prg: STR to .word allocated memory fails

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

1769 assembly language prg: STR to .word allocated memory fails

182 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cktham on Fri Jun 10 08:30:02 MST 2011
I have reserved memory using .word :
var1:
    .word 0
:
and then tried to save to it using :
LDR R3, =var1
STR R2, [R3]
:

but this doesn't work (R3 loads address of var1 correctly, but contents of R2 not written to memory) and causes an ImpreciseErr.

Can someone give me some pointers on why this doesn't work since allocating and saving to memory is a basic yet essential operation in assembly language programs.

Thanks.

Chen
0 Kudos
Reply
0 Replies