- To read
the value
stored in
a variable in memory,
you need to use a
load instruction:
ldrsb rN, [rM] or ldrsh rN, [rM] or ldr rN, [rM]
|
- To update
the value
stored in
a variable in memory,
you need to use a
store instruction:
strb rN, [rM] or strh rN, [rM] or str rN, [rM]
|
- Therefore:
- The
information
you need to
access
(= read or
write) a
variable in
memory
|
are:
- The
address of the
variable
(= the info in
register
rM)
- The
data type of the
variable
(to select the
correct
load/store instruction)
|
|