Subroutines Flashcards

1
Q

Subroutines allow?

A

The repetition of calculations using varying arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Open (inline) Subroutines are?

A

Subroutines where the code is inserted inline wherever the subroutine is invoked (usually using macro pre-preocessor)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Closed Subroutines are?

A

Subroutines where the code for the routine only appears once in RAM
When invoked control jumps to the first instruction of the routine and when finished control returns to the next instruction in the calling code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the maximum amount of arguments that can be passed to a subroutine?

A

8, in registers x0-x7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are Pointer Arguments?

A

Arguments where the memory address of a local variable is passed to the subroutine
Variable will be in RAM not a register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

If there are more than 8 arguments where must they go?

A

The are passed on the stack

Sometimes called spilled arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly