CompSystems 245 - Week 2 - Lecture 6 - Functions and the Stack

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

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:38 PM on 8/24/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

17 Terms

1
New cards

Describe the function in C:

  • How they are defined

  • breakdown of their definition'

  • purpose


knowt flashcard image
2
New cards

Describe how a function call affects program flow:

  • what non-branching instructions do to prgram flow

  • what function calls do

  • c equivalent of function calls in assembly


knowt flashcard image
3
New cards

Describe the fetch execute cycle of a CPU when a conditional branch is used:

  • first line is the branching instruction

  • condition is met 3 lines after

  • state how it affects performance


knowt flashcard image
4
New cards

Describe how to call functions in ARM:

  • calling a function

  • returning from a function

  • the process of how either works

  • the keyword that helps with function calls and returns


knowt flashcard image
5
New cards
<p>Describe the arguments and return values of a function in ARM:</p><ul><li><p>how arguments are used</p></li><li><p>how return values are used</p></li><li><p>convert the c code into ARM code</p></li></ul><p></p>

Describe the arguments and return values of a function in ARM:

  • how arguments are used

  • how return values are used

  • convert the c code into ARM code


knowt flashcard image
6
New cards

Describe the function used to branch to an address stored in a register

knowt flashcard image
7
New cards

Describe how to call a function from another function in ARM assembly:

  • how the first function is called

  • how the second function is called

  • how the functions are returned


knowt flashcard image
8
New cards

Describe how to implement recursive functions in ARM


knowt flashcard image
9
New cards

Describe the convention of function calls relating to return values and arguments in ARM:

  • where arguments are stored

  • register of return value

  • how double-word sized data is stored

  • how to store more arguments

  • which registers are preserved


knowt flashcard image
10
New cards

Describe the Stack:

  • its purpose

  • what it is

  • instructions for accessing it

  • How it grows and shrinks in ARM


knowt flashcard image
11
New cards

Describe the Stack:

  • what it stores



knowt flashcard image
12
New cards

Describe the stack:

  • its use in storing local variables

  • how data is stored on it

  • location of most recent data item


knowt flashcard image
13
New cards

Describe the stack in the memory layout of the STM32F407VGT

knowt flashcard image
14
New cards

Describe the Stack pointer:

  • what it does

  • where it starts in memory

  • direction of growth in memory

  • when increm


knowt flashcard image
15
New cards

Describe how the Stack operates in the STM32F407VGT microcontroller:

  • Processor used

  • architecture used

  • what pushing data does

  • what popping data does

  • location of base address in Stack



16
New cards
<p>For the following C code:</p><ul><li><p>Write the equivalent ARM code that doesn’t violate rules</p></li></ul><p></p>

For the following C code:

  • Write the equivalent ARM code that doesn’t violate rules


knowt flashcard image
17
New cards

Describe how to load/store multiple registers to the stack at once:

  • The operations used

  • how to decrement/increment before or after