The assembly language code below shows a short function named F1 that calls another function named F2. The code for F2 i
Posted: Sun May 15, 2022 8:31 am
The assembly language code below shows a short function named F1
that calls another function named F2. The code for F2 is not shown.
Note that the line numbers shown in the leftmost column are not
part of the code and are only shown for reference. Explain what the
STR instruction on line 2 is doing and why this operation is
necessary.
1 F1: MOV
R0,#9 ;pass
this parameter to F2
2
STR R14,[R13],#-4
3 BL F2:
4 STR R0,[R1]
;store result returned from
F2
5 LDR
R15,[R13],#4
that calls another function named F2. The code for F2 is not shown.
Note that the line numbers shown in the leftmost column are not
part of the code and are only shown for reference. Explain what the
STR instruction on line 2 is doing and why this operation is
necessary.
1 F1: MOV
R0,#9 ;pass
this parameter to F2
2
STR R14,[R13],#-4
3 BL F2:
4 STR R0,[R1]
;store result returned from
F2
5 LDR
R15,[R13],#4