1/9
Flashcards reviewing branching, conditional execution, and related concepts in ARM assembly.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is the purpose of branching instructions in assembly?
To change the PC to point to a different instruction than the next sequential instruction in memory.
What are the two main types of branches?
Unconditional branching and Conditional branching.
What is the purpose of a label in assembly?
Labels are symbols that represent addresses. They help avoid manually calculating addresses.
What does the CPSR stand for and what is its function?
Current Program Status Register. It records the state of the program, including flags like N, Z, C, and V.
What does the 'cmp' instruction do?
Performs a comparison (subtraction), updates the CPSR, and discards the result.
Give examples of conditional branching instructions.
BEQ (branch if equal), BNE (branch if not equal), BLT (branch if less than).
What does the IT instruction in Thumb-2 assembly do?
Provides conditional execution for up to four consecutive instructions.
What is the function of the PC (Program Counter) register?
The PC register contains the address of the next instruction to be executed
How is PC updated to point to the next sequential instruction?
PC = PC + 4 during fetch to point to next instruction.
What is Program-relative addressing?
A reference to a label within the same section uses the program counter plus or minus an offset.