D2 ARM instruction

1, assembly language

2, a command: Data Processing: MOV R1, # 1 R1 = 1; MOV R2, R1 R2 = R1;

3, (MVN R3, # 0x000000FF 0xFFFFFF00 is actually stored)

4, the jump instruction (B): -> Modify the PC;

Load / Store instructions:                                 

Status register transfer:

5, software interrupt (SWI) instruction:

6, the coprocessor instruction (CP15):

7, b pseudo operation;

c directive

8, the assembler comment with a semicolon (;) 

ADDS (C 1 position, the need to add S)

ADC R3, R1, R2 ---- (C set carry 1 R3 = R1 + R2 + C)

NZCV N minus sign Z Zero flag bit C into the subtraction by adder positions 0

 

Jump instruction (B \ BL)

9, ARM instruction execution conditions

Comparison of the BEQ statement equal, Z = 1 jump B

BNE not equal the comparison statement, Z = 0 jump B

 

10, Load data from memory into register

Store data is stored to memory from a register STR R1 ------> R2

STM may be linked with a suffix {IA, IB, DA, DB}

Index before STR R1, [R2, # 1] R1 stored in [R2 + 1] address

After indexing STR R1, [R2]. # 4 RI stored in the R2, so that R2 = R2 + 4

Before and after the index STR R1, [R2, # 4]! R1 stored in [R2 + 4] address, and R2 = R2 + 4

Batch register Memory Access STM

STM R11 <--- {R1-R5} small numbers corresponding to lower address, memory access register indexable quantities

** Key:

STM may be linked with a suffix {IA, IB, DA, DB} increa afte increase befor discrease after

STMIA R11,{R1-R5} 

11, a period when the nature of the stack memory for temporary data stack sp points

Space by EA, empty reduce ED, filled by FA, ​​** full reduction FD

Initialize the stack MOV SP, # 0x40000020

Entering subroutine push STMFD SP, {R1, R2} Note!:! Automatic indexing, increment or decrement

Return to the main function of the pull LDMFD SP!, {R1, R2}

12, BSS (Block Started by Symbol ) generally refers to a procedure used to store uninitialized global variables , and static variables a memory area.

13, a 32-bit ARM instruction

14, MRS read CPSR

MSR R1, CPSR generally eighth modified CPSR

 

Guess you like

Origin www.cnblogs.com/device/p/11256976.html