N |
Z |
C |
V |
Q |
S |
I |
F |
T |
T |
T |
T |
T |
|
|
|
|
|
31 |
|
28 |
27 |
26 |
25 |
24 |
23 |
22 |
21 |
20 |
19 |
|
16 |
15 |
|
0 |
condition |
1 |
0 |
0 |
P |
U |
0 |
W |
0 |
basereg |
reglist |
1 ;@.text
2 ;@.globl funstm
3 ;@.align 0
4 ;@ **** STM (Addressing Mode 4) ****
5 ;
6 ; Store multiple registers to memory
7 ; from base address held in R9,
8 ; increment base address after each use
9 ; update R9 finally at end
10 ;
11 AREA example,CODE,READONLY
12
13 label1
14
15 00000000 E1A09008 MOV R9, R8
16 00000004 E8A901F7 STMIA R9!, {R1,R0,R2,R4-R7,R8}
17
18
19 ; -----------------------------------
20 ; Example 2 shows pushing registers
21 ; R0 thru R7 onto stack, together with
22 ; the Link Register, at entry to a
23 ; subroutine.
24 ;
25 ; Then at end of subroutine POP these
26 ; same resisters off stack, and place
27 ; the value of Link Reg onto PC causing
28 ; a return to calling program
29
30
31 AREA example,CODE,READONLY
32
33 label1a
34 00000008 E8AD40FF STMFD R13!, {R0-R7,LR}
35 00000012 E8BD80FF LDMFD R13!, {R0-R7,PC}