ARM Processor and Assembly Language Flashcards

1
Q

What is load-store architecture?

A
  • Data operands must first be loaded into the CPU using the load instruction (LDR) and then stored back into main memory using memory store (STR) to save the results
  • Arithmetic and logical operations cannot be performed directly in memory locations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens to the PC when an instruction is fetched?

A
  • It is incremented by 4 to hold the address of the next instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How many memory addresses does one ARM instruction take?

A
  • The instructions are 32 bits and each memory address holds one byte (8bits) so it takes 4 memory addresses for one instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the CPSR?

A
  • The current program status register’s 4 MSBs can be optionally set by using the ‘S’ option
    • N - negative signed number
    • Z - zero bit, where every bit of the result is 0
    • C - carry bit, when the operation has carry
    • V - overflow bit, set when the a signed arithmetic operation results in overflow
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens during a single-cycle data processing instruction?

A
  • Two register operands are accesed
  • The value on the B bus is shifted (if needed) and operated on in with the the value in the A bus in the ALU
  • The result is written back to the register bank
  • The program counter value is fed into the incrementer, then the incremented value is copied back into the r15 register bank, and also into the address register to be used as the address for the nect instruction fetch
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the barrel shifter?

A

Can shift or rotate the second operand, on the B Bus by a maximum of 32 bits.

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

What is the instruction decoder?

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

What translates high level code into assembly code?

A

The compiler

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

What type of instruction can modify data values?

A

Data processing instrctions are the only instructions which modify data values

(All ofther instructions just move data around and control the sequence of program execution)

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

What are some rules of ARM data processing instructions?

A
  1. All operands are 32 bits wide and come from registers or are specified as literals in the instruction itself.
  2. The result, if there is one, is 32 bits wide and is placed in a register.
  3. Each of the operand registers and the result register are independently specified in the instruction. That is, the ARM uses a ‘3-address’ format for these instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What order must operands be stated in assembly language source code?

A
  1. Result register
  2. First operand
  3. Second operand
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is changed when the instruction below is executed?

ADD r0, r1, r2

A

When this instruction is executed the only change to the system state is the value of the destination register r0 (and, optionally, the N, Z, C and V flags in the CPSR for most of the instructions,)

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

What do comparision operations do?

A
  • They do not produce a result
  • They set the condition code vits ( N, Z, C, V) in the CPSR
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an immediate operand?

A
  • Can be used to add a constant to a register, by replacing the second source register with an immediate value
  • The standard size is 8-bits for the immediate operand, but you can use up to 32 bits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How are the condition code flags set?

A
  • Only the comparison operations CMP or TST can set the flags
  • In assembly language, an S is added to the opcode.
    *
How well did you know this?
1
Not at all
2
3
4
5
Perfectly