# Show this main Functions are programmed
EXPORT main
#main Is the name of the function IDA Pro It can automatically identify all functions and names in the source program
main
#IDA Stack variables identified
var_C = -0xC
var_8 = -8
# Stack addressing instruction Push the value of a register onto the stack
STMFD SP1,{R11,LR}
#SP The value of the register plus 4 Bestow R11 register
ADD R11,SP,#4
#SP The value of the register is subtracted 8 Bestow SP register
SUB SP ,SP,#8
# Write register instruction hold R0 The value in the register is saved to the stack variable var_8 in
STR R0, {R11,#var_8}
# Write register instruction hold R1 The value in the register is saved to the stack variable var_C in
STR R1, {R11,#var_C}
# Read register instruction hold (aHelloArm-0x8300) The calculated address is put into the R3 Register
LDR R3, =(aHelloArm-0x8300)
#PC Register value plus R3 The value of the register Put into R3 register
ADD R3, PC,R3
# hold R3 The value of the register is placed in the R0 Register
MOV R0, R3
# Similar to calling function function function puts In the standard input-output function printf Implementation of
BL puts
# hold 0 Assign to R3 register
MOV R3, #0
# hold R3 The value in the register is assigned to the R0 register
MOV R0, R3
#R11 The value of the register is subtracted 4 Bestow SP register
SUB SP, R11,#4
# Stack addressing instruction Recover the value of a register from the stack
LDMFD SP!{R11,PC}
#include<stdio.h>
int main(int argc, char * argv[]){
printf("Hello Arm !\n");
return 0;
}
Technology
Daily Recommendation