tags:
- bsu
- spring-2025
- ece-330
- microprocessors
- formulation
- school
source: https://boisestatecanvas.instructure.com/courses/36351/assignments/1197130
created: 2025-02-10
Problem: Match each instruction to the proper addressing mode.
Answer:
Addressing mode | Instruction |
---|---|
Post-indexed | LDR r0, [r1], #2 |
Register indirect with register offset | LDR r0, [r1, r2] |
Register indirect with constant offset | LDR r0, [r1, #2] |
Pre-indexed | LDR r0, [r1, #2]! |
Register indirect | LDR r0, [r1] |
Problem: Place the registers in their appropriate categories.
Answer:
r0
, r2
, r5
, r12
.LR
- Link Register.PC
- Program Counter.PSR
- Program Status Counter.SP
- Stack Pointer.MAR
- Memory Address Register.MDR
- Memory Data Register.IR
- Instruction Register.AND
- Accessible Non-Data.DUD
- Data Used Daily.NOR
- Non Operating Register.Problem: Arrange the instruction execution operations in the correct order.
Answer:
Problem: Select the operations needed to calculate the Two's Complement of 5.
Answer:
MVN r0, #5
.ADD r0, r0, #1
.Problem: Which of the following instructions is functionally equivalent to ADR r4, label1
?
Answer: LDR r4, =label1
.
Problem: What is a newer version of the ARM instruction set that combines both 16-bit and 32-bit instructions which provides the code density
benefits of 16-bit instructions with the additional performance benefits of access to 32- bit instructions?
Answer: Thumb-2.
Problem: What is the assembly language instruction itself called?
Answer: The mnemonic.
Problem: Which instruction would you use to load a signed byte of data from memory into register r0
?
Answer: LDRSB r0, [r4]
.
Problem: Place the statements in the correct categories.
Answer:
Problem: Which Cortex family is used for embedded computing?
Answer: Cortex-M series.
Problem: Place each instruction in the proper category.
Answer:
MOV
- Move.LDR
- Load register.STR
- Store register.ADD
- Add.AND
- Logical AND.ASR
- Arithmetic shift right.DIV
- Divide.LSR
- Logical shift right.MUL
- Multiply.RBIT
- Reverse bits.REV
- Reverse.SUB
- Subtract.B
- Branch.BEQ
- Branch if equal.BL
- Branch with link.BX
- Branch and exchange.Problem: Place the instructions in the correct order to perform the indicated calculation.
Answer:
ADR r4, A
LDR r0, [r4]
ADR r4, B
LDR r1, [r4]
MUL r0, r0, r1
ADR r4, C
LDR r2, [r4]
ADD r0, r0, r2
ADR r4, X
STR r0, [r4]
Problem: Which of the following is an advantage of instruction pipelining.
Answer: It increases throughput to achieve one instruction per
clock cycle.