ARM 2 Flashcards

1
Q

what are addressing modes

A

various formats of specifying the operands in instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are the various addressing modes

A

1.Immediate (data specified)
MOV R5, #0x20
2.Register (all logical and arithmetic instr based on this mode only in ARM)
MOV R5, R1
3.Direct (address of operand is given)
this address will be 12 bits offset from PC given by assembler
LDR R5, Variable
STR R5, Variable
4. Indirect addressing mode
address of operand is given by register
LDR, R5, [R1]
5. Register Relative Indirect Addressing mode
address of memory register + numeric value
LDR R0, [R1,#0x04]
LDR R0, [R1,#0x04]!
pre index addressing
LDR R0, [R1],#0x04
post index addressing
6. Base Indexed Indirect addressing mode
address- sum of two registers
first reg - base, second reg -index
LDR R0,[R1,R2]
LDR R0,[R1,R2]!

PRE INDEX ADDRESSING
LDR R0,[R1],R2
7. Base with scaled index indirect addressing mode
LDR R0, [R1, R2, LSL #2]
R0 - data from memory pointed by (R1+R2 shifted left by 2 bits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ARM instruction set

A
  1. Data processing
  2. Branch
  3. Load and store
  4. SWI (Software interrupt) instr
  5. program status register instr
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what does barrel shifter mean

A

enables shifting 32 bit operand in one of the source registers left or right by specific no of positions within the cycle time of instr

mov r7,r5,LSL#2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is SWP used for?

A

swap a word between memory and register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is SWPB used for?

A

swap a byte between memory and register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly