Study Notes on Functions, Subroutines, and Stacks in C and ARM Assembly

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

Flashcards covering important vocabulary and concepts from the lecture on ARM subroutines and stack management.

Last updated 11:16 PM on 1/10/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

18 Terms

1
New cards

Function

A small block of code in C that can be called and reused, also known as a subroutine, procedure, or method.

2
New cards

Procedure

A function in C that does not return a value, considered by purists as the true nature of a procedure.

3
New cards

Callee

The function that is called by another function (the caller).

4
New cards

Caller

The function that initiates a call to another function (the callee).

5
New cards

Branch Instruction

An instruction used to jump to a different part of the code, often how subroutines can be called.

6
New cards

Return Address

The address in the code which tells the callee where to return control after execution is complete.

7
New cards

Link Register

A special register (R14 in ARM architecture) used to store the return address of the caller.

8
New cards

Program Counter (PC)

A register that holds the address of the next instruction to be executed.

9
New cards

Branch-with-Link (BL)

An instruction in ARM that calls a subroutine and automatically stores the return address in the Link Register.

10
New cards

APCS

ARM Procedure Call Standard; a guideline to manage register usage in function calls.

11
New cards

Caller Saved Registers

Registers R0-R3 are used to pass arguments and can be overwritten by called functions.

12
New cards

Callee Saved Registers

Registers R4-R8 need to be preserved by a callee if they are used.

13
New cards

Self-Modifying Code

Code that modifies its own instructions while executing, used in earlier computer systems like EDSAC.

14
New cards

Return Instruction

The instruction used in a function to return control to the caller, typically done with MOV PC, R14.

15
New cards

Opcode

Operation code; denotes the instruction to be executed in computer programs.

16
New cards

Scratch Register

Registers used temporarily by a function that do not need to retain their values across calls.

17
New cards

Stack Frame

A section of the memory stack that stores local variables and return addresses for a function.

18
New cards

Argument Stack

The method of passing additional arguments to functions when there are more arguments than available registers.