1/17
Flashcards covering important vocabulary and concepts from the lecture on ARM subroutines and stack management.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Function
A small block of code in C that can be called and reused, also known as a subroutine, procedure, or method.
Procedure
A function in C that does not return a value, considered by purists as the true nature of a procedure.
Callee
The function that is called by another function (the caller).
Caller
The function that initiates a call to another function (the callee).
Branch Instruction
An instruction used to jump to a different part of the code, often how subroutines can be called.
Return Address
The address in the code which tells the callee where to return control after execution is complete.
Link Register
A special register (R14 in ARM architecture) used to store the return address of the caller.
Program Counter (PC)
A register that holds the address of the next instruction to be executed.
Branch-with-Link (BL)
An instruction in ARM that calls a subroutine and automatically stores the return address in the Link Register.
APCS
ARM Procedure Call Standard; a guideline to manage register usage in function calls.
Caller Saved Registers
Registers R0-R3 are used to pass arguments and can be overwritten by called functions.
Callee Saved Registers
Registers R4-R8 need to be preserved by a callee if they are used.
Self-Modifying Code
Code that modifies its own instructions while executing, used in earlier computer systems like EDSAC.
Return Instruction
The instruction used in a function to return control to the caller, typically done with MOV PC, R14.
Opcode
Operation code; denotes the instruction to be executed in computer programs.
Scratch Register
Registers used temporarily by a function that do not need to retain their values across calls.
Stack Frame
A section of the memory stack that stores local variables and return addresses for a function.
Argument Stack
The method of passing additional arguments to functions when there are more arguments than available registers.