WEBVTT
Kind: captions
Language: en

00:00:00.170 --> 00:00:09.750 align:start position:0%
 
[Music]

00:00:09.750 --> 00:00:09.760 align:start position:0%
 
 

00:00:09.760 --> 00:00:11.230 align:start position:0%
 
hi<00:00:09.920><c> everyone</c><00:00:10.360><c> thanks</c><00:00:10.559><c> for</c><00:00:10.679><c> watching</c><00:00:10.920><c> Lori</c>

00:00:11.230 --> 00:00:11.240 align:start position:0%
hi everyone thanks for watching Lori
 

00:00:11.240 --> 00:00:13.030 align:start position:0%
hi everyone thanks for watching Lori
wired<00:00:11.880><c> and</c><00:00:12.040><c> in</c><00:00:12.200><c> this</c><00:00:12.400><c> video</c><00:00:12.679><c> we're</c><00:00:12.840><c> going</c><00:00:12.920><c> to</c>

00:00:13.030 --> 00:00:13.040 align:start position:0%
wired and in this video we're going to
 

00:00:13.040 --> 00:00:15.310 align:start position:0%
wired and in this video we're going to
be<00:00:13.160><c> using</c><00:00:13.480><c> the</c><00:00:13.679><c> stack</c><00:00:14.080><c> to</c><00:00:14.240><c> store</c><00:00:14.759><c> additional</c>

00:00:15.310 --> 00:00:15.320 align:start position:0%
be using the stack to store additional
 

00:00:15.320 --> 00:00:17.790 align:start position:0%
be using the stack to store additional
arguments<00:00:16.000><c> during</c><00:00:16.199><c> a</c><00:00:16.359><c> function</c><00:00:16.760><c> call</c><00:00:17.560><c> now</c><00:00:17.720><c> if</c>

00:00:17.790 --> 00:00:17.800 align:start position:0%
arguments during a function call now if
 

00:00:17.800 --> 00:00:19.790 align:start position:0%
arguments during a function call now if
you<00:00:17.960><c> remember</c><00:00:18.400><c> we</c><00:00:18.560><c> talked</c><00:00:18.880><c> about</c><00:00:19.240><c> how</c><00:00:19.680><c> you</c>

00:00:19.790 --> 00:00:19.800 align:start position:0%
you remember we talked about how you
 

00:00:19.800 --> 00:00:22.750 align:start position:0%
you remember we talked about how you
could<00:00:19.960><c> use</c><00:00:20.240><c> the</c><00:00:20.519><c> first</c><00:00:20.880><c> four</c><00:00:21.359><c> registers</c><00:00:22.039><c> r0</c>

00:00:22.750 --> 00:00:22.760 align:start position:0%
could use the first four registers r0
 

00:00:22.760 --> 00:00:25.470 align:start position:0%
could use the first four registers r0
through<00:00:23.039><c> R3</c><00:00:24.039><c> to</c><00:00:24.359><c> pass</c><00:00:24.599><c> the</c><00:00:24.760><c> first</c><00:00:25.080><c> four</c>

00:00:25.470 --> 00:00:25.480 align:start position:0%
through R3 to pass the first four
 

00:00:25.480 --> 00:00:28.109 align:start position:0%
through R3 to pass the first four
arguments<00:00:26.039><c> to</c><00:00:26.240><c> a</c><00:00:26.439><c> function</c><00:00:27.320><c> but</c><00:00:27.480><c> if</c><00:00:27.560><c> you</c><00:00:27.760><c> had</c>

00:00:28.109 --> 00:00:28.119 align:start position:0%
arguments to a function but if you had
 

00:00:28.119 --> 00:00:30.150 align:start position:0%
arguments to a function but if you had
additional<00:00:28.679><c> arguments</c><00:00:29.199><c> you</c><00:00:29.519><c> actually</c><00:00:30.039><c> have</c>

00:00:30.150 --> 00:00:30.160 align:start position:0%
additional arguments you actually have
 

00:00:30.160 --> 00:00:32.910 align:start position:0%
additional arguments you actually have
to<00:00:30.279><c> use</c><00:00:30.519><c> the</c><00:00:30.800><c> stack</c><00:00:31.199><c> to</c><00:00:31.439><c> store</c><00:00:31.920><c> these</c><00:00:32.200><c> values</c>

00:00:32.910 --> 00:00:32.920 align:start position:0%
to use the stack to store these values
 

00:00:32.920 --> 00:00:34.990 align:start position:0%
to use the stack to store these values
so<00:00:33.079><c> you</c><00:00:33.200><c> can</c><00:00:33.440><c> pass</c><00:00:33.680><c> them</c><00:00:33.840><c> to</c><00:00:34.040><c> the</c><00:00:34.200><c> function</c><00:00:34.840><c> so</c>

00:00:34.990 --> 00:00:35.000 align:start position:0%
so you can pass them to the function so
 

00:00:35.000 --> 00:00:36.310 align:start position:0%
so you can pass them to the function so
let's<00:00:35.160><c> get</c><00:00:35.360><c> right</c><00:00:35.520><c> into</c><00:00:35.719><c> it</c><00:00:35.840><c> and</c><00:00:35.960><c> let's</c><00:00:36.160><c> see</c>

00:00:36.310 --> 00:00:36.320 align:start position:0%
let's get right into it and let's see
 

00:00:36.320 --> 00:00:38.990 align:start position:0%
let's get right into it and let's see
how<00:00:36.440><c> we</c><00:00:36.559><c> do</c><00:00:36.960><c> that</c><00:00:37.960><c> I'm</c><00:00:38.040><c> going</c><00:00:38.160><c> to</c><00:00:38.280><c> open</c><00:00:38.520><c> up</c><00:00:38.760><c> my</c>

00:00:38.990 --> 00:00:39.000 align:start position:0%
how we do that I'm going to open up my
 

00:00:39.000 --> 00:00:41.709 align:start position:0%
how we do that I'm going to open up my
CPU<00:00:39.480><c> later</c><00:00:40.360><c> and</c><00:00:40.480><c> I</c><00:00:40.640><c> have</c><00:00:40.840><c> the</c><00:00:41.079><c> program</c><00:00:41.440><c> that</c><00:00:41.559><c> we</c>

00:00:41.709 --> 00:00:41.719 align:start position:0%
CPU later and I have the program that we
 

00:00:41.719 --> 00:00:44.029 align:start position:0%
CPU later and I have the program that we
created<00:00:42.239><c> in</c><00:00:42.399><c> the</c><00:00:42.640><c> last</c><00:00:43.000><c> video</c><00:00:43.640><c> so</c><00:00:43.760><c> if</c><00:00:43.879><c> you</c>

00:00:44.029 --> 00:00:44.039 align:start position:0%
created in the last video so if you
 

00:00:44.039 --> 00:00:46.069 align:start position:0%
created in the last video so if you
haven't<00:00:44.360><c> seen</c><00:00:44.719><c> that</c><00:00:44.879><c> feel</c><00:00:45.120><c> free</c><00:00:45.320><c> to</c><00:00:45.520><c> go</c><00:00:45.680><c> back</c>

00:00:46.069 --> 00:00:46.079 align:start position:0%
haven't seen that feel free to go back
 

00:00:46.079 --> 00:00:48.830 align:start position:0%
haven't seen that feel free to go back
and<00:00:46.280><c> get</c><00:00:46.399><c> to</c><00:00:46.640><c> this</c><00:00:46.920><c> point</c><00:00:47.840><c> and</c><00:00:48.120><c> we</c><00:00:48.320><c> have</c><00:00:48.640><c> this</c>

00:00:48.830 --> 00:00:48.840 align:start position:0%
and get to this point and we have this
 

00:00:48.840 --> 00:00:50.389 align:start position:0%
and get to this point and we have this
program<00:00:49.160><c> that's</c><00:00:49.360><c> going</c><00:00:49.520><c> to</c><00:00:49.680><c> take</c><00:00:50.000><c> two</c>

00:00:50.389 --> 00:00:50.399 align:start position:0%
program that's going to take two
 

00:00:50.399 --> 00:00:52.990 align:start position:0%
program that's going to take two
arguments<00:00:51.199><c> two</c><00:00:51.480><c> numbers</c><00:00:52.160><c> and</c><00:00:52.359><c> simply</c><00:00:52.760><c> add</c>

00:00:52.990 --> 00:00:53.000 align:start position:0%
arguments two numbers and simply add
 

00:00:53.000 --> 00:00:55.630 align:start position:0%
arguments two numbers and simply add
them<00:00:53.359><c> together</c><00:00:53.680><c> inside</c><00:00:54.039><c> of</c><00:00:54.160><c> a</c><00:00:54.359><c> function</c><00:00:55.359><c> so</c><00:00:55.480><c> we</c>

00:00:55.630 --> 00:00:55.640 align:start position:0%
them together inside of a function so we
 

00:00:55.640 --> 00:00:57.630 align:start position:0%
them together inside of a function so we
have<00:00:55.800><c> this</c><00:00:56.079><c> add</c><00:00:56.320><c> numbers</c><00:00:56.760><c> function</c><00:00:57.160><c> call</c><00:00:57.480><c> it's</c>

00:00:57.630 --> 00:00:57.640 align:start position:0%
have this add numbers function call it's
 

00:00:57.640 --> 00:00:59.630 align:start position:0%
have this add numbers function call it's
going<00:00:57.760><c> to</c><00:00:57.960><c> add</c><00:00:58.320><c> these</c><00:00:58.480><c> two</c><00:00:58.719><c> numbers</c><00:00:59.440><c> and</c><00:00:59.519><c> then</c>

00:00:59.630 --> 00:00:59.640 align:start position:0%
going to add these two numbers and then
 

00:00:59.640 --> 00:01:01.270 align:start position:0%
going to add these two numbers and then
br<00:00:59.879><c> Branch</c><00:01:00.239><c> back</c><00:01:00.480><c> to</c><00:01:00.640><c> get</c><00:01:00.800><c> out</c><00:01:00.960><c> of</c><00:01:01.120><c> the</c>

00:01:01.270 --> 00:01:01.280 align:start position:0%
br Branch back to get out of the
 

00:01:01.280 --> 00:01:03.910 align:start position:0%
br Branch back to get out of the
function<00:01:01.960><c> storing</c><00:01:02.399><c> the</c><00:01:02.719><c> return</c><00:01:03.079><c> value</c><00:01:03.640><c> into</c>

00:01:03.910 --> 00:01:03.920 align:start position:0%
function storing the return value into
 

00:01:03.920 --> 00:01:05.830 align:start position:0%
function storing the return value into
our<00:01:04.119><c> R2</c><00:01:04.720><c> register</c><00:01:05.320><c> so</c><00:01:05.439><c> what</c><00:01:05.519><c> we're</c><00:01:05.640><c> going</c><00:01:05.720><c> to</c>

00:01:05.830 --> 00:01:05.840 align:start position:0%
our R2 register so what we're going to
 

00:01:05.840 --> 00:01:07.630 align:start position:0%
our R2 register so what we're going to
do<00:01:06.040><c> is</c><00:01:06.119><c> we're</c><00:01:06.280><c> going</c><00:01:06.439><c> to</c><00:01:06.720><c> modify</c><00:01:07.240><c> this</c><00:01:07.400><c> to</c>

00:01:07.630 --> 00:01:07.640 align:start position:0%
do is we're going to modify this to
 

00:01:07.640 --> 00:01:10.350 align:start position:0%
do is we're going to modify this to
instead<00:01:08.119><c> add</c><00:01:08.439><c> six</c><00:01:08.759><c> numbers</c><00:01:09.320><c> together</c><00:01:09.960><c> so</c><00:01:10.159><c> that</c>

00:01:10.350 --> 00:01:10.360 align:start position:0%
instead add six numbers together so that
 

00:01:10.360 --> 00:01:12.630 align:start position:0%
instead add six numbers together so that
the<00:01:10.520><c> first</c><00:01:10.920><c> four</c><00:01:11.360><c> arguments</c><00:01:11.960><c> are</c><00:01:12.240><c> passed</c>

00:01:12.630 --> 00:01:12.640 align:start position:0%
the first four arguments are passed
 

00:01:12.640 --> 00:01:15.149 align:start position:0%
the first four arguments are passed
inside<00:01:12.920><c> of</c><00:01:13.040><c> our</c><00:01:13.280><c> registers</c><00:01:14.159><c> but</c><00:01:14.320><c> the</c><00:01:14.520><c> last</c><00:01:14.759><c> two</c>

00:01:15.149 --> 00:01:15.159 align:start position:0%
inside of our registers but the last two
 

00:01:15.159 --> 00:01:16.789 align:start position:0%
inside of our registers but the last two
we<00:01:15.400><c> actually</c><00:01:15.600><c> going</c><00:01:15.680><c> to</c><00:01:15.880><c> be</c><00:01:16.000><c> storing</c><00:01:16.400><c> on</c><00:01:16.560><c> the</c>

00:01:16.789 --> 00:01:16.799 align:start position:0%
we actually going to be storing on the
 

00:01:16.799 --> 00:01:19.270 align:start position:0%
we actually going to be storing on the
stack<00:01:17.240><c> and</c><00:01:17.439><c> passing</c><00:01:17.880><c> those</c><00:01:18.479><c> that</c><00:01:18.640><c> way</c><00:01:18.880><c> to</c><00:01:19.119><c> the</c>

00:01:19.270 --> 00:01:19.280 align:start position:0%
stack and passing those that way to the
 

00:01:19.280 --> 00:01:21.950 align:start position:0%
stack and passing those that way to the
add<00:01:19.520><c> numbers</c><00:01:20.200><c> function</c><00:01:21.200><c> so</c><00:01:21.360><c> let's</c><00:01:21.560><c> get</c><00:01:21.680><c> into</c>

00:01:21.950 --> 00:01:21.960 align:start position:0%
add numbers function so let's get into
 

00:01:21.960 --> 00:01:23.390 align:start position:0%
add numbers function so let's get into
this<00:01:22.119><c> and</c><00:01:22.280><c> let's</c><00:01:22.439><c> see</c><00:01:22.680><c> we</c><00:01:22.799><c> have</c><00:01:22.920><c> our</c><00:01:23.119><c> first</c>

00:01:23.390 --> 00:01:23.400 align:start position:0%
this and let's see we have our first
 

00:01:23.400 --> 00:01:26.270 align:start position:0%
this and let's see we have our first
argument<00:01:24.320><c> and</c><00:01:24.479><c> our</c><00:01:24.720><c> second</c><00:01:25.079><c> argument</c><00:01:26.000><c> now</c>

00:01:26.270 --> 00:01:26.280 align:start position:0%
argument and our second argument now
 

00:01:26.280 --> 00:01:28.510 align:start position:0%
argument and our second argument now
remember<00:01:26.720><c> we</c><00:01:26.880><c> have</c><00:01:27.119><c> up</c><00:01:27.439><c> through</c><00:01:27.759><c> the</c><00:01:27.880><c> R3</c>

00:01:28.510 --> 00:01:28.520 align:start position:0%
remember we have up through the R3
 

00:01:28.520 --> 00:01:30.390 align:start position:0%
remember we have up through the R3
register<00:01:29.000><c> to</c><00:01:29.159><c> store</c><00:01:29.439><c> our</c><00:01:29.560><c> first</c><00:01:29.920><c> first</c><00:01:30.119><c> four</c>

00:01:30.390 --> 00:01:30.400 align:start position:0%
register to store our first first four
 

00:01:30.400 --> 00:01:32.510 align:start position:0%
register to store our first first four
arguments<00:01:30.880><c> so</c><00:01:31.000><c> let's</c><00:01:31.200><c> just</c><00:01:31.320><c> go</c><00:01:31.479><c> ahead</c><00:01:31.640><c> and</c><00:01:31.840><c> add</c>

00:01:32.510 --> 00:01:32.520 align:start position:0%
arguments so let's just go ahead and add
 

00:01:32.520 --> 00:01:35.149 align:start position:0%
arguments so let's just go ahead and add
those<00:01:33.520><c> so</c><00:01:33.640><c> I'm</c><00:01:33.720><c> going</c><00:01:33.840><c> to</c><00:01:34.000><c> do</c>

00:01:35.149 --> 00:01:35.159 align:start position:0%
those so I'm going to do
 

00:01:35.159 --> 00:01:38.870 align:start position:0%
those so I'm going to do
move<00:01:36.439><c> R2</c><00:01:37.439><c> and</c><00:01:37.640><c> then</c><00:01:37.920><c> let's</c><00:01:38.119><c> just</c><00:01:38.280><c> keep</c><00:01:38.479><c> going</c>

00:01:38.870 --> 00:01:38.880 align:start position:0%
move R2 and then let's just keep going
 

00:01:38.880 --> 00:01:41.789 align:start position:0%
move R2 and then let's just keep going
with<00:01:39.200><c> our</c><00:01:39.479><c> convention</c><00:01:40.479><c> we'll</c><00:01:40.720><c> do</c><00:01:41.640><c> the</c>

00:01:41.789 --> 00:01:41.799 align:start position:0%
with our convention we'll do the
 

00:01:41.799 --> 00:01:43.149 align:start position:0%
with our convention we'll do the
immediate<00:01:42.200><c> value</c><00:01:42.439><c> three</c><00:01:42.759><c> this</c><00:01:42.880><c> is</c><00:01:42.960><c> going</c><00:01:43.079><c> to</c>

00:01:43.149 --> 00:01:43.159 align:start position:0%
immediate value three this is going to
 

00:01:43.159 --> 00:01:46.749 align:start position:0%
immediate value three this is going to
be<00:01:43.240><c> our</c><00:01:43.520><c> AR</c><00:01:43.880><c> argument</c><00:01:44.600><c> three</c><00:01:45.600><c> we'll</c><00:01:45.799><c> do</c>

00:01:46.749 --> 00:01:46.759 align:start position:0%
be our AR argument three we'll do
 

00:01:46.759 --> 00:01:48.310 align:start position:0%
be our AR argument three we'll do
move

00:01:48.310 --> 00:01:48.320 align:start position:0%
move
 

00:01:48.320 --> 00:01:52.270 align:start position:0%
move
R3<00:01:49.320><c> the</c><00:01:49.439><c> immediate</c><00:01:49.880><c> value</c><00:01:50.640><c> four</c><00:01:51.640><c> so</c><00:01:51.880><c> now</c><00:01:52.040><c> we've</c>

00:01:52.270 --> 00:01:52.280 align:start position:0%
R3 the immediate value four so now we've
 

00:01:52.280 --> 00:01:54.550 align:start position:0%
R3 the immediate value four so now we've
actually<00:01:52.640><c> met</c><00:01:53.079><c> the</c><00:01:53.240><c> quota</c><00:01:53.680><c> of</c><00:01:53.880><c> registers</c><00:01:54.399><c> that</c>

00:01:54.550 --> 00:01:54.560 align:start position:0%
actually met the quota of registers that
 

00:01:54.560 --> 00:01:57.190 align:start position:0%
actually met the quota of registers that
we<00:01:54.640><c> can</c><00:01:54.840><c> use</c><00:01:55.159><c> for</c><00:01:55.439><c> this</c><00:01:55.600><c> function</c><00:01:56.000><c> call</c><00:01:56.680><c> so</c><00:01:56.880><c> now</c>

00:01:57.190 --> 00:01:57.200 align:start position:0%
we can use for this function call so now
 

00:01:57.200 --> 00:01:59.069 align:start position:0%
we can use for this function call so now
all<00:01:57.360><c> of</c><00:01:57.479><c> our</c><00:01:57.759><c> other</c><00:01:58.000><c> two</c><00:01:58.399><c> values</c><00:01:58.880><c> that</c><00:01:58.960><c> we're</c>

00:01:59.069 --> 00:01:59.079 align:start position:0%
all of our other two values that we're
 

00:01:59.079 --> 00:02:00.789 align:start position:0%
all of our other two values that we're
going<00:01:59.200><c> to</c><00:01:59.320><c> be</c><00:01:59.479><c> adding</c><00:02:00.119><c> are</c><00:02:00.280><c> going</c><00:02:00.399><c> to</c><00:02:00.560><c> have</c><00:02:00.680><c> to</c>

00:02:00.789 --> 00:02:00.799 align:start position:0%
going to be adding are going to have to
 

00:02:00.799 --> 00:02:03.469 align:start position:0%
going to be adding are going to have to
be<00:02:00.960><c> stored</c><00:02:01.320><c> on</c><00:02:01.479><c> the</c><00:02:01.759><c> stack</c><00:02:02.759><c> so</c><00:02:02.960><c> let</c><00:02:03.039><c> me</c><00:02:03.280><c> take</c>

00:02:03.469 --> 00:02:03.479 align:start position:0%
be stored on the stack so let me take
 

00:02:03.479 --> 00:02:05.630 align:start position:0%
be stored on the stack so let me take
our<00:02:03.880><c> push</c><00:02:04.280><c> operation</c><00:02:04.880><c> right</c><00:02:05.079><c> here</c><00:02:05.280><c> and</c><00:02:05.399><c> let's</c>

00:02:05.630 --> 00:02:05.640 align:start position:0%
our push operation right here and let's
 

00:02:05.640 --> 00:02:08.109 align:start position:0%
our push operation right here and let's
just<00:02:05.840><c> modify</c><00:02:06.240><c> it</c><00:02:06.360><c> for</c><00:02:06.640><c> this</c><00:02:06.960><c> case</c><00:02:07.960><c> I'm</c><00:02:08.039><c> going</c>

00:02:08.109 --> 00:02:08.119 align:start position:0%
just modify it for this case I'm going
 

00:02:08.119 --> 00:02:09.710 align:start position:0%
just modify it for this case I'm going
to<00:02:08.280><c> move</c><00:02:08.560><c> this</c><00:02:08.759><c> up</c><00:02:09.000><c> here</c><00:02:09.280><c> since</c><00:02:09.479><c> we're</c><00:02:09.599><c> going</c>

00:02:09.710 --> 00:02:09.720 align:start position:0%
to move this up here since we're going
 

00:02:09.720 --> 00:02:11.550 align:start position:0%
to move this up here since we're going
to<00:02:09.840><c> be</c><00:02:10.039><c> modifying</c><00:02:10.560><c> the</c>

00:02:11.550 --> 00:02:11.560 align:start position:0%
to be modifying the
 

00:02:11.560 --> 00:02:13.790 align:start position:0%
to be modifying the
stack<00:02:12.560><c> so</c><00:02:12.680><c> I'm</c><00:02:12.760><c> going</c><00:02:12.879><c> to</c><00:02:13.040><c> take</c><00:02:13.319><c> this</c><00:02:13.680><c> and</c>

00:02:13.790 --> 00:02:13.800 align:start position:0%
stack so I'm going to take this and
 

00:02:13.800 --> 00:02:16.229 align:start position:0%
stack so I'm going to take this and
let's<00:02:14.000><c> just</c><00:02:14.120><c> save</c><00:02:14.360><c> our</c><00:02:14.480><c> link</c><00:02:15.000><c> register</c><00:02:16.000><c> and</c>

00:02:16.229 --> 00:02:16.239 align:start position:0%
let's just save our link register and
 

00:02:16.239 --> 00:02:18.270 align:start position:0%
let's just save our link register and
make<00:02:16.440><c> this</c><00:02:16.680><c> last</c><00:02:16.920><c> one</c><00:02:17.200><c> match</c><00:02:17.480><c> up</c>

00:02:18.270 --> 00:02:18.280 align:start position:0%
make this last one match up
 

00:02:18.280 --> 00:02:20.550 align:start position:0%
make this last one match up
accordingly<00:02:19.280><c> now</c><00:02:19.440><c> I</c><00:02:19.519><c> don't</c><00:02:19.760><c> necessarily</c><00:02:20.400><c> have</c>

00:02:20.550 --> 00:02:20.560 align:start position:0%
accordingly now I don't necessarily have
 

00:02:20.560 --> 00:02:22.949 align:start position:0%
accordingly now I don't necessarily have
to<00:02:20.720><c> save</c><00:02:21.080><c> this</c><00:02:21.319><c> value</c><00:02:21.959><c> but</c><00:02:22.080><c> if</c><00:02:22.200><c> I</c><00:02:22.319><c> was</c><00:02:22.599><c> inside</c>

00:02:22.949 --> 00:02:22.959 align:start position:0%
to save this value but if I was inside
 

00:02:22.959 --> 00:02:24.790 align:start position:0%
to save this value but if I was inside
of<00:02:23.080><c> a</c><00:02:23.280><c> function</c><00:02:23.800><c> I</c><00:02:23.920><c> would</c><00:02:24.080><c> save</c><00:02:24.360><c> the</c><00:02:24.480><c> link</c>

00:02:24.790 --> 00:02:24.800 align:start position:0%
of a function I would save the link
 

00:02:24.800 --> 00:02:26.990 align:start position:0%
of a function I would save the link
register<00:02:25.680><c> so</c><00:02:25.879><c> that</c><00:02:26.080><c> my</c><00:02:26.280><c> program</c><00:02:26.599><c> knows</c><00:02:26.879><c> where</c>

00:02:26.990 --> 00:02:27.000 align:start position:0%
register so that my program knows where
 

00:02:27.000 --> 00:02:29.070 align:start position:0%
register so that my program knows where
to<00:02:27.160><c> jump</c><00:02:27.519><c> back</c><00:02:27.720><c> to</c><00:02:28.040><c> once</c><00:02:28.239><c> I</c><00:02:28.440><c> complete</c><00:02:28.879><c> this</c>

00:02:29.070 --> 00:02:29.080 align:start position:0%
to jump back to once I complete this
 

00:02:29.080 --> 00:02:30.270 align:start position:0%
to jump back to once I complete this
code

00:02:30.270 --> 00:02:30.280 align:start position:0%
code
 

00:02:30.280 --> 00:02:32.229 align:start position:0%
code
but<00:02:30.440><c> now</c><00:02:30.560><c> we</c><00:02:30.680><c> have</c><00:02:30.800><c> our</c><00:02:31.000><c> first</c><00:02:31.239><c> four</c><00:02:31.599><c> arguments</c>

00:02:32.229 --> 00:02:32.239 align:start position:0%
but now we have our first four arguments
 

00:02:32.239 --> 00:02:34.270 align:start position:0%
but now we have our first four arguments
so<00:02:32.440><c> let's</c><00:02:32.760><c> add</c><00:02:33.000><c> our</c><00:02:33.280><c> last</c><00:02:33.480><c> two</c><00:02:33.680><c> arguments</c><00:02:34.120><c> to</c>

00:02:34.270 --> 00:02:34.280 align:start position:0%
so let's add our last two arguments to
 

00:02:34.280 --> 00:02:36.470 align:start position:0%
so let's add our last two arguments to
the<00:02:34.640><c> stack</c><00:02:35.640><c> now</c><00:02:35.800><c> the</c><00:02:35.920><c> first</c><00:02:36.120><c> thing</c><00:02:36.239><c> I'm</c><00:02:36.360><c> going</c>

00:02:36.470 --> 00:02:36.480 align:start position:0%
the stack now the first thing I'm going
 

00:02:36.480 --> 00:02:38.150 align:start position:0%
the stack now the first thing I'm going
to<00:02:36.599><c> do</c><00:02:36.800><c> is</c><00:02:36.920><c> I'm</c><00:02:37.120><c> actually</c><00:02:37.280><c> going</c><00:02:37.440><c> to</c><00:02:37.599><c> allocate</c>

00:02:38.150 --> 00:02:38.160 align:start position:0%
to do is I'm actually going to allocate
 

00:02:38.160 --> 00:02:40.390 align:start position:0%
to do is I'm actually going to allocate
some<00:02:38.440><c> space</c><00:02:38.840><c> on</c><00:02:39.000><c> the</c><00:02:39.200><c> stack</c><00:02:39.879><c> and</c><00:02:40.000><c> I</c><00:02:40.080><c> can</c><00:02:40.200><c> do</c>

00:02:40.390 --> 00:02:40.400 align:start position:0%
some space on the stack and I can do
 

00:02:40.400 --> 00:02:42.190 align:start position:0%
some space on the stack and I can do
this<00:02:40.560><c> with</c><00:02:40.680><c> the</c><00:02:40.840><c> sub</c><00:02:41.200><c> command</c><00:02:41.879><c> so</c><00:02:42.000><c> I'm</c><00:02:42.080><c> going</c>

00:02:42.190 --> 00:02:42.200 align:start position:0%
this with the sub command so I'm going
 

00:02:42.200 --> 00:02:43.149 align:start position:0%
this with the sub command so I'm going
to<00:02:42.319><c> do</c>

00:02:43.149 --> 00:02:43.159 align:start position:0%
to do
 

00:02:43.159 --> 00:02:46.630 align:start position:0%
to do
SUB<00:02:44.159><c> do</c><00:02:44.360><c> stack</c><00:02:44.720><c> pointers</c><00:02:45.239><c> the</c><00:02:45.360><c> destination</c>

00:02:46.630 --> 00:02:46.640 align:start position:0%
SUB do stack pointers the destination
 

00:02:46.640 --> 00:02:50.110 align:start position:0%
SUB do stack pointers the destination
register<00:02:47.640><c> then</c><00:02:48.480><c> SP</c><00:02:49.480><c> and</c><00:02:49.599><c> then</c><00:02:49.760><c> I'm</c><00:02:49.879><c> going</c><00:02:49.959><c> to</c>

00:02:50.110 --> 00:02:50.120 align:start position:0%
register then SP and then I'm going to
 

00:02:50.120 --> 00:02:52.430 align:start position:0%
register then SP and then I'm going to
do<00:02:50.319><c> the</c><00:02:50.480><c> immediate</c><00:02:50.959><c> value</c><00:02:51.319><c> eight</c><00:02:52.120><c> now</c><00:02:52.280><c> the</c>

00:02:52.430 --> 00:02:52.440 align:start position:0%
do the immediate value eight now the
 

00:02:52.440 --> 00:02:54.110 align:start position:0%
do the immediate value eight now the
reason<00:02:52.760><c> I'm</c><00:02:52.920><c> doing</c><00:02:53.239><c> this</c><00:02:53.480><c> is</c><00:02:53.640><c> because</c><00:02:53.959><c> I'm</c>

00:02:54.110 --> 00:02:54.120 align:start position:0%
reason I'm doing this is because I'm
 

00:02:54.120 --> 00:02:56.350 align:start position:0%
reason I'm doing this is because I'm
going<00:02:54.280><c> to</c><00:02:54.360><c> be</c><00:02:54.560><c> passing</c><00:02:55.040><c> two</c><00:02:55.440><c> arguments</c><00:02:55.959><c> on</c><00:02:56.120><c> the</c>

00:02:56.350 --> 00:02:56.360 align:start position:0%
going to be passing two arguments on the
 

00:02:56.360 --> 00:02:58.470 align:start position:0%
going to be passing two arguments on the
stack<00:02:57.040><c> and</c><00:02:57.200><c> each</c><00:02:57.360><c> of</c><00:02:57.599><c> these</c><00:02:57.800><c> are</c><00:02:58.000><c> going</c><00:02:58.159><c> to</c><00:02:58.319><c> be</c>

00:02:58.470 --> 00:02:58.480 align:start position:0%
stack and each of these are going to be
 

00:02:58.480 --> 00:03:01.790 align:start position:0%
stack and each of these are going to be
four<00:02:58.840><c> bytes</c><00:02:59.280><c> long</c><00:03:00.040><c> so</c><00:03:00.360><c> the</c><00:03:00.599><c> first</c><00:03:00.959><c> four</c><00:03:01.360><c> bytes</c>

00:03:01.790 --> 00:03:01.800 align:start position:0%
four bytes long so the first four bytes
 

00:03:01.800 --> 00:03:03.710 align:start position:0%
four bytes long so the first four bytes
is<00:03:01.959><c> going</c><00:03:02.040><c> to</c><00:03:02.159><c> be</c><00:03:02.280><c> the</c><00:03:02.440><c> first</c><00:03:02.800><c> variable</c><00:03:03.560><c> then</c>

00:03:03.710 --> 00:03:03.720 align:start position:0%
is going to be the first variable then
 

00:03:03.720 --> 00:03:05.630 align:start position:0%
is going to be the first variable then
the<00:03:03.879><c> second</c><00:03:04.120><c> four</c><00:03:04.400><c> bytes</c><00:03:04.720><c> is</c><00:03:04.840><c> going</c><00:03:05.000><c> to</c><00:03:05.200><c> be</c><00:03:05.400><c> the</c>

00:03:05.630 --> 00:03:05.640 align:start position:0%
the second four bytes is going to be the
 

00:03:05.640 --> 00:03:07.509 align:start position:0%
the second four bytes is going to be the
second<00:03:05.959><c> variable</c><00:03:06.720><c> which</c><00:03:06.840><c> is</c><00:03:06.959><c> a</c><00:03:07.080><c> total</c><00:03:07.360><c> of</c>

00:03:07.509 --> 00:03:07.519 align:start position:0%
second variable which is a total of
 

00:03:07.519 --> 00:03:09.149 align:start position:0%
second variable which is a total of
eight<00:03:07.879><c> bytes</c><00:03:08.360><c> that</c><00:03:08.480><c> I'm</c><00:03:08.599><c> going</c><00:03:08.760><c> to</c><00:03:08.879><c> have</c><00:03:09.000><c> to</c>

00:03:09.149 --> 00:03:09.159 align:start position:0%
eight bytes that I'm going to have to
 

00:03:09.159 --> 00:03:11.390 align:start position:0%
eight bytes that I'm going to have to
allocate<00:03:09.680><c> on</c><00:03:09.840><c> the</c><00:03:10.040><c> stack</c><00:03:10.720><c> next</c><00:03:10.959><c> I'm</c><00:03:11.080><c> going</c><00:03:11.159><c> to</c>

00:03:11.390 --> 00:03:11.400 align:start position:0%
allocate on the stack next I'm going to
 

00:03:11.400 --> 00:03:14.390 align:start position:0%
allocate on the stack next I'm going to
actually<00:03:11.920><c> add</c><00:03:12.280><c> my</c><00:03:12.480><c> two</c><00:03:12.879><c> values</c><00:03:13.360><c> to</c><00:03:13.599><c> the</c><00:03:13.799><c> stack</c>

00:03:14.390 --> 00:03:14.400 align:start position:0%
actually add my two values to the stack
 

00:03:14.400 --> 00:03:15.869 align:start position:0%
actually add my two values to the stack
and<00:03:14.519><c> this</c><00:03:14.640><c> is</c><00:03:14.799><c> kind</c><00:03:14.920><c> of</c><00:03:15.120><c> interesting</c><00:03:15.720><c> because</c>

00:03:15.869 --> 00:03:15.879 align:start position:0%
and this is kind of interesting because
 

00:03:15.879 --> 00:03:18.550 align:start position:0%
and this is kind of interesting because
we<00:03:16.159><c> pass</c><00:03:16.640><c> these</c><00:03:17.159><c> on</c><00:03:17.360><c> the</c><00:03:17.599><c> stack</c><00:03:18.000><c> in</c><00:03:18.200><c> kind</c><00:03:18.319><c> of</c>

00:03:18.550 --> 00:03:18.560 align:start position:0%
we pass these on the stack in kind of
 

00:03:18.560 --> 00:03:20.789 align:start position:0%
we pass these on the stack in kind of
reverse<00:03:19.040><c> order</c><00:03:19.400><c> of</c><00:03:19.599><c> what</c><00:03:19.680><c> you</c><00:03:19.799><c> would</c><00:03:20.080><c> think</c>

00:03:20.789 --> 00:03:20.799 align:start position:0%
reverse order of what you would think
 

00:03:20.799 --> 00:03:22.350 align:start position:0%
reverse order of what you would think
but<00:03:20.959><c> this</c><00:03:21.040><c> is</c><00:03:21.159><c> going</c><00:03:21.280><c> to</c><00:03:21.360><c> be</c><00:03:21.519><c> the</c><00:03:21.640><c> same</c><00:03:21.760><c> in</c><00:03:21.959><c> arm</c>

00:03:22.350 --> 00:03:22.360 align:start position:0%
but this is going to be the same in arm
 

00:03:22.360 --> 00:03:24.670 align:start position:0%
but this is going to be the same in arm
the<00:03:22.440><c> same</c><00:03:22.599><c> in</c><00:03:22.760><c> x86</c><00:03:23.560><c> and</c><00:03:23.760><c> the</c><00:03:23.879><c> same</c><00:03:24.040><c> in</c><00:03:24.200><c> a</c><00:03:24.360><c> lot</c><00:03:24.480><c> of</c>

00:03:24.670 --> 00:03:24.680 align:start position:0%
the same in x86 and the same in a lot of
 

00:03:24.680 --> 00:03:26.630 align:start position:0%
the same in x86 and the same in a lot of
different<00:03:25.120><c> architectures</c><00:03:26.120><c> so</c><00:03:26.280><c> you'll</c><00:03:26.480><c> get</c>

00:03:26.630 --> 00:03:26.640 align:start position:0%
different architectures so you'll get
 

00:03:26.640 --> 00:03:30.149 align:start position:0%
different architectures so you'll get
pretty<00:03:26.879><c> used</c><00:03:27.080><c> to</c><00:03:27.439><c> this</c><00:03:28.439><c> so</c><00:03:28.640><c> we</c><00:03:28.720><c> can</c><00:03:28.879><c> do</c><00:03:29.200><c> move</c>

00:03:30.149 --> 00:03:30.159 align:start position:0%
pretty used to this so we can do move
 

00:03:30.159 --> 00:03:32.229 align:start position:0%
pretty used to this so we can do move
and<00:03:30.319><c> let's</c><00:03:30.480><c> just</c><00:03:30.680><c> pick</c><00:03:30.799><c> on</c><00:03:30.920><c> the</c><00:03:31.040><c> R4</c>

00:03:32.229 --> 00:03:32.239 align:start position:0%
and let's just pick on the R4
 

00:03:32.239 --> 00:03:34.710 align:start position:0%
and let's just pick on the R4
register<00:03:33.239><c> and</c><00:03:33.439><c> we'll</c><00:03:33.840><c> add</c><00:03:34.080><c> the</c><00:03:34.239><c> immediate</c>

00:03:34.710 --> 00:03:34.720 align:start position:0%
register and we'll add the immediate
 

00:03:34.720 --> 00:03:37.149 align:start position:0%
register and we'll add the immediate
value<00:03:35.120><c> six</c><00:03:35.760><c> which</c><00:03:35.879><c> is</c><00:03:36.000><c> going</c><00:03:36.200><c> to</c><00:03:36.360><c> be</c><00:03:36.560><c> the</c><00:03:36.799><c> last</c>

00:03:37.149 --> 00:03:37.159 align:start position:0%
value six which is going to be the last
 

00:03:37.159 --> 00:03:40.149 align:start position:0%
value six which is going to be the last
argument<00:03:38.040><c> and</c><00:03:38.159><c> then</c><00:03:38.319><c> we</c><00:03:38.439><c> can</c><00:03:38.640><c> do</c><00:03:39.239><c> store</c>

00:03:40.149 --> 00:03:40.159 align:start position:0%
argument and then we can do store
 

00:03:40.159 --> 00:03:43.710 align:start position:0%
argument and then we can do store
register<00:03:41.159><c> the</c><00:03:41.280><c> current</c><00:03:41.680><c> value</c><00:03:42.040><c> in</c><00:03:42.599><c> R4</c><00:03:43.599><c> and</c>

00:03:43.710 --> 00:03:43.720 align:start position:0%
register the current value in R4 and
 

00:03:43.720 --> 00:03:46.589 align:start position:0%
register the current value in R4 and
then<00:03:43.799><c> we're</c><00:03:43.959><c> going</c><00:03:44.040><c> to</c><00:03:44.200><c> store</c><00:03:44.599><c> that</c><00:03:44.920><c> into</c><00:03:45.920><c> SP</c>

00:03:46.589 --> 00:03:46.599 align:start position:0%
then we're going to store that into SP
 

00:03:46.599 --> 00:03:49.589 align:start position:0%
then we're going to store that into SP
so<00:03:46.799><c> wherever</c><00:03:47.239><c> SP</c><00:03:47.799><c> is</c><00:03:48.000><c> currently</c><00:03:48.400><c> pointing</c><00:03:48.840><c> to</c>

00:03:49.589 --> 00:03:49.599 align:start position:0%
so wherever SP is currently pointing to
 

00:03:49.599 --> 00:03:52.550 align:start position:0%
so wherever SP is currently pointing to
that<00:03:49.720><c> is</c><00:03:49.840><c> going</c><00:03:49.959><c> to</c><00:03:50.120><c> hold</c><00:03:50.480><c> our</c><00:03:50.799><c> last</c><00:03:51.560><c> argument</c>

00:03:52.550 --> 00:03:52.560 align:start position:0%
that is going to hold our last argument
 

00:03:52.560 --> 00:03:54.190 align:start position:0%
that is going to hold our last argument
and<00:03:52.680><c> then</c><00:03:52.879><c> next</c><00:03:53.120><c> we</c><00:03:53.280><c> actually</c><00:03:53.439><c> want</c><00:03:53.560><c> to</c><00:03:53.760><c> store</c>

00:03:54.190 --> 00:03:54.200 align:start position:0%
and then next we actually want to store
 

00:03:54.200 --> 00:03:57.350 align:start position:0%
and then next we actually want to store
the<00:03:54.480><c> fifth</c><00:03:55.040><c> argument</c><00:03:55.920><c> so</c><00:03:56.120><c> let's</c><00:03:56.319><c> do</c><00:03:56.640><c> move</c>

00:03:57.350 --> 00:03:57.360 align:start position:0%
the fifth argument so let's do move
 

00:03:57.360 --> 00:03:58.910 align:start position:0%
the fifth argument so let's do move
we'll<00:03:57.519><c> just</c><00:03:57.680><c> pick</c><00:03:57.799><c> on</c><00:03:57.920><c> our</c><00:03:58.120><c> four</c><00:03:58.439><c> again</c><00:03:58.640><c> we</c><00:03:58.720><c> can</c>

00:03:58.910 --> 00:03:58.920 align:start position:0%
we'll just pick on our four again we can
 

00:03:58.920 --> 00:04:03.069 align:start position:0%
we'll just pick on our four again we can
reuse<00:03:59.239><c> it</c><00:04:00.120><c> r</c><00:04:00.480><c> four</c><00:04:01.480><c> the</c><00:04:01.599><c> immediate</c><00:04:02.079><c> value</c>

00:04:03.069 --> 00:04:03.079 align:start position:0%
reuse it r four the immediate value
 

00:04:03.079 --> 00:04:05.550 align:start position:0%
reuse it r four the immediate value
five<00:04:04.079><c> and</c><00:04:04.159><c> then</c><00:04:04.280><c> we'll</c><00:04:04.480><c> store</c><00:04:04.879><c> our</c><00:04:05.120><c> register</c>

00:04:05.550 --> 00:04:05.560 align:start position:0%
five and then we'll store our register
 

00:04:05.560 --> 00:04:07.750 align:start position:0%
five and then we'll store our register
to<00:04:05.720><c> the</c><00:04:05.920><c> next</c><00:04:06.280><c> location</c><00:04:06.840><c> on</c><00:04:07.040><c> the</c>

00:04:07.750 --> 00:04:07.760 align:start position:0%
to the next location on the
 

00:04:07.760 --> 00:04:11.910 align:start position:0%
to the next location on the
stack<00:04:08.760><c> store</c><00:04:09.519><c> register</c>

00:04:11.910 --> 00:04:11.920 align:start position:0%
stack store register
 

00:04:11.920 --> 00:04:15.390 align:start position:0%
stack store register
R4<00:04:12.920><c> and</c><00:04:13.000><c> then</c><00:04:13.120><c> we'll</c><00:04:13.319><c> do</c><00:04:13.640><c> stack</c><00:04:14.280><c> pointer</c><00:04:15.280><c> but</c>

00:04:15.390 --> 00:04:15.400 align:start position:0%
R4 and then we'll do stack pointer but
 

00:04:15.400 --> 00:04:17.349 align:start position:0%
R4 and then we'll do stack pointer but
I'm<00:04:15.640><c> actually</c><00:04:15.879><c> going</c><00:04:15.959><c> to</c><00:04:16.320><c> offset</c><00:04:16.919><c> this</c><00:04:17.160><c> by</c>

00:04:17.349 --> 00:04:17.359 align:start position:0%
I'm actually going to offset this by
 

00:04:17.359 --> 00:04:19.749 align:start position:0%
I'm actually going to offset this by
four<00:04:18.160><c> so</c><00:04:18.359><c> the</c><00:04:18.560><c> first</c><00:04:18.840><c> four</c><00:04:19.239><c> bytes</c><00:04:19.519><c> are</c><00:04:19.639><c> going</c>

00:04:19.749 --> 00:04:19.759 align:start position:0%
four so the first four bytes are going
 

00:04:19.759 --> 00:04:22.230 align:start position:0%
four so the first four bytes are going
to<00:04:19.840><c> be</c><00:04:20.000><c> taken</c><00:04:20.280><c> up</c><00:04:20.600><c> here</c><00:04:21.079><c> at</c><00:04:21.280><c> the</c><00:04:21.519><c> base</c><00:04:21.919><c> address</c>

00:04:22.230 --> 00:04:22.240 align:start position:0%
to be taken up here at the base address
 

00:04:22.240 --> 00:04:24.710 align:start position:0%
to be taken up here at the base address
of<00:04:22.400><c> Stack</c><00:04:22.759><c> pointer</c><00:04:23.520><c> then</c><00:04:23.720><c> we</c><00:04:23.800><c> can</c><00:04:24.040><c> offset</c><00:04:24.479><c> this</c>

00:04:24.710 --> 00:04:24.720 align:start position:0%
of Stack pointer then we can offset this
 

00:04:24.720 --> 00:04:27.749 align:start position:0%
of Stack pointer then we can offset this
by<00:04:24.880><c> four</c><00:04:25.560><c> to</c><00:04:25.840><c> store</c><00:04:26.639><c> the</c><00:04:26.960><c> immediate</c><00:04:27.360><c> value</c>

00:04:27.749 --> 00:04:27.759 align:start position:0%
by four to store the immediate value
 

00:04:27.759 --> 00:04:30.830 align:start position:0%
by four to store the immediate value
five<00:04:28.080><c> at</c><00:04:28.240><c> the</c><00:04:28.520><c> next</c><00:04:28.840><c> four</c><00:04:29.160><c> bytes</c><00:04:29.440><c> of</c><00:04:29.840><c> available</c>

00:04:30.830 --> 00:04:30.840 align:start position:0%
five at the next four bytes of available
 

00:04:30.840 --> 00:04:32.909 align:start position:0%
five at the next four bytes of available
so<00:04:30.960><c> I'm</c><00:04:31.080><c> going</c><00:04:31.160><c> to</c><00:04:31.280><c> do</c><00:04:31.520><c> comma</c><00:04:32.360><c> the</c><00:04:32.479><c> immediate</c>

00:04:32.909 --> 00:04:32.919 align:start position:0%
so I'm going to do comma the immediate
 

00:04:32.919 --> 00:04:35.469 align:start position:0%
so I'm going to do comma the immediate
value<00:04:33.320><c> for</c><00:04:34.320><c> now</c><00:04:34.440><c> you</c><00:04:34.560><c> may</c><00:04:34.720><c> have</c><00:04:34.880><c> noticed</c><00:04:35.360><c> that</c>

00:04:35.469 --> 00:04:35.479 align:start position:0%
value for now you may have noticed that
 

00:04:35.479 --> 00:04:37.189 align:start position:0%
value for now you may have noticed that
I<00:04:35.560><c> was</c><00:04:35.759><c> actually</c><00:04:36.120><c> subtracting</c><00:04:36.840><c> from</c><00:04:37.039><c> the</c>

00:04:37.189 --> 00:04:37.199 align:start position:0%
I was actually subtracting from the
 

00:04:37.199 --> 00:04:39.469 align:start position:0%
I was actually subtracting from the
stack<00:04:37.600><c> pointer</c><00:04:38.600><c> now</c><00:04:38.759><c> if</c><00:04:38.840><c> you're</c><00:04:39.039><c> thinking</c><00:04:39.320><c> of</c>

00:04:39.469 --> 00:04:39.479 align:start position:0%
stack pointer now if you're thinking of
 

00:04:39.479 --> 00:04:42.390 align:start position:0%
stack pointer now if you're thinking of
the<00:04:39.720><c> stack</c><00:04:40.199><c> it's</c><00:04:40.479><c> actually</c><00:04:40.800><c> growing</c><00:04:41.520><c> downward</c>

00:04:42.390 --> 00:04:42.400 align:start position:0%
the stack it's actually growing downward
 

00:04:42.400 --> 00:04:44.110 align:start position:0%
the stack it's actually growing downward
so<00:04:42.560><c> it's</c><00:04:42.720><c> starting</c><00:04:43.039><c> at</c><00:04:43.320><c> higher</c><00:04:43.639><c> memory</c>

00:04:44.110 --> 00:04:44.120 align:start position:0%
so it's starting at higher memory
 

00:04:44.120 --> 00:04:46.590 align:start position:0%
so it's starting at higher memory
addresses<00:04:44.840><c> and</c><00:04:44.960><c> then</c><00:04:45.160><c> going</c><00:04:45.440><c> to</c><00:04:45.800><c> lower</c><00:04:46.199><c> memory</c>

00:04:46.590 --> 00:04:46.600 align:start position:0%
addresses and then going to lower memory
 

00:04:46.600 --> 00:04:49.029 align:start position:0%
addresses and then going to lower memory
addresses<00:04:47.520><c> so</c><00:04:47.680><c> if</c><00:04:47.800><c> we</c><00:04:47.880><c> want</c><00:04:48.000><c> to</c><00:04:48.199><c> allocate</c><00:04:48.680><c> new</c>

00:04:49.029 --> 00:04:49.039 align:start position:0%
addresses so if we want to allocate new
 

00:04:49.039 --> 00:04:51.350 align:start position:0%
addresses so if we want to allocate new
space<00:04:49.360><c> on</c><00:04:49.520><c> the</c><00:04:49.720><c> stack</c><00:04:50.360><c> we</c><00:04:50.560><c> actually</c><00:04:50.840><c> need</c><00:04:51.039><c> to</c>

00:04:51.350 --> 00:04:51.360 align:start position:0%
space on the stack we actually need to
 

00:04:51.360 --> 00:04:53.590 align:start position:0%
space on the stack we actually need to
subtract<00:04:51.960><c> for</c><00:04:52.199><c> it</c><00:04:52.560><c> and</c><00:04:52.680><c> then</c><00:04:52.840><c> when</c><00:04:53.039><c> we're</c><00:04:53.240><c> done</c>

00:04:53.590 --> 00:04:53.600 align:start position:0%
subtract for it and then when we're done
 

00:04:53.600 --> 00:04:55.749 align:start position:0%
subtract for it and then when we're done
we're<00:04:53.800><c> going</c><00:04:53.960><c> to</c><00:04:54.280><c> add</c><00:04:54.759><c> to</c><00:04:55.080><c> the</c><00:04:55.280><c> value</c><00:04:55.520><c> of</c><00:04:55.639><c> the</c>

00:04:55.749 --> 00:04:55.759 align:start position:0%
we're going to add to the value of the
 

00:04:55.759 --> 00:04:58.189 align:start position:0%
we're going to add to the value of the
stack<00:04:56.120><c> pointer</c><00:04:56.759><c> to</c><00:04:57.000><c> get</c><00:04:57.160><c> rid</c><00:04:57.320><c> of</c><00:04:57.520><c> those</c><00:04:57.759><c> values</c>

00:04:58.189 --> 00:04:58.199 align:start position:0%
stack pointer to get rid of those values
 

00:04:58.199 --> 00:05:00.270 align:start position:0%
stack pointer to get rid of those values
that<00:04:58.320><c> we</c><00:04:58.520><c> previously</c><00:04:59.039><c> allocated</c>

00:05:00.270 --> 00:05:00.280 align:start position:0%
that we previously allocated
 

00:05:00.280 --> 00:05:02.270 align:start position:0%
that we previously allocated
so<00:05:00.440><c> to</c><00:05:00.639><c> do</c><00:05:00.919><c> that</c><00:05:01.400><c> I'm</c><00:05:01.479><c> going</c><00:05:01.600><c> to</c><00:05:01.759><c> come</c><00:05:02.000><c> down</c>

00:05:02.270 --> 00:05:02.280 align:start position:0%
so to do that I'm going to come down
 

00:05:02.280 --> 00:05:04.270 align:start position:0%
so to do that I'm going to come down
here<00:05:02.680><c> so</c><00:05:02.800><c> we're</c><00:05:02.919><c> going</c><00:05:03.039><c> to</c><00:05:03.280><c> reset</c><00:05:03.720><c> the</c><00:05:03.919><c> stack</c>

00:05:04.270 --> 00:05:04.280 align:start position:0%
here so we're going to reset the stack
 

00:05:04.280 --> 00:05:06.870 align:start position:0%
here so we're going to reset the stack
pointer<00:05:05.039><c> after</c><00:05:05.360><c> we've</c><00:05:05.639><c> done</c><00:05:06.000><c> our</c><00:05:06.400><c> arguments</c>

00:05:06.870 --> 00:05:06.880 align:start position:0%
pointer after we've done our arguments
 

00:05:06.880 --> 00:05:09.710 align:start position:0%
pointer after we've done our arguments
and<00:05:07.120><c> actually</c><00:05:07.520><c> made</c><00:05:07.880><c> the</c><00:05:08.039><c> function</c><00:05:08.520><c> call</c><00:05:09.520><c> so</c>

00:05:09.710 --> 00:05:09.720 align:start position:0%
and actually made the function call so
 

00:05:09.720 --> 00:05:12.870 align:start position:0%
and actually made the function call so
the<00:05:09.880><c> opposite</c><00:05:10.199><c> of</c><00:05:10.400><c> sub</c><00:05:10.880><c> is</c><00:05:11.039><c> going</c><00:05:11.199><c> to</c><00:05:11.320><c> be</c><00:05:11.880><c> add</c>

00:05:12.870 --> 00:05:12.880 align:start position:0%
the opposite of sub is going to be add
 

00:05:12.880 --> 00:05:15.430 align:start position:0%
the opposite of sub is going to be add
so<00:05:13.160><c> add</c><00:05:13.840><c> destination</c><00:05:14.360><c> is</c>

00:05:15.430 --> 00:05:15.440 align:start position:0%
so add destination is
 

00:05:15.440 --> 00:05:19.029 align:start position:0%
so add destination is
sp<00:05:16.639><c> sp</c><00:05:17.639><c> and</c><00:05:17.800><c> then</c><00:05:17.960><c> we'll</c><00:05:18.120><c> just</c><00:05:18.240><c> do</c><00:05:18.440><c> eight</c><00:05:18.680><c> bytes</c>

00:05:19.029 --> 00:05:19.039 align:start position:0%
sp sp and then we'll just do eight bytes
 

00:05:19.039 --> 00:05:20.629 align:start position:0%
sp sp and then we'll just do eight bytes
again<00:05:19.199><c> so</c><00:05:19.360><c> we</c><00:05:19.440><c> can</c><00:05:19.600><c> get</c><00:05:19.759><c> rid</c><00:05:19.880><c> of</c><00:05:20.000><c> the</c><00:05:20.199><c> previous</c>

00:05:20.629 --> 00:05:20.639 align:start position:0%
again so we can get rid of the previous
 

00:05:20.639 --> 00:05:23.230 align:start position:0%
again so we can get rid of the previous
eight<00:05:20.880><c> bytes</c><00:05:21.240><c> that</c><00:05:21.360><c> we</c><00:05:21.520><c> allocated</c><00:05:22.120><c> for</c><00:05:23.000><c> so</c>

00:05:23.230 --> 00:05:23.240 align:start position:0%
eight bytes that we allocated for so
 

00:05:23.240 --> 00:05:25.350 align:start position:0%
eight bytes that we allocated for so
this<00:05:23.440><c> way</c><00:05:23.680><c> we're</c><00:05:23.880><c> using</c><00:05:24.240><c> the</c><00:05:24.440><c> stack</c><00:05:25.120><c> we're</c>

00:05:25.350 --> 00:05:25.360 align:start position:0%
this way we're using the stack we're
 

00:05:25.360 --> 00:05:27.790 align:start position:0%
this way we're using the stack we're
allocating<00:05:25.960><c> some</c><00:05:26.240><c> space</c><00:05:26.560><c> up</c><00:05:26.840><c> here</c><00:05:27.520><c> we're</c>

00:05:27.790 --> 00:05:27.800 align:start position:0%
allocating some space up here we're
 

00:05:27.800 --> 00:05:30.309 align:start position:0%
allocating some space up here we're
resetting<00:05:28.360><c> it</c><00:05:28.600><c> down</c><00:05:28.880><c> here</c><00:05:29.680><c> and</c><00:05:29.800><c> then</c><00:05:29.960><c> when</c><00:05:30.080><c> we</c>

00:05:30.309 --> 00:05:30.319 align:start position:0%
resetting it down here and then when we
 

00:05:30.319 --> 00:05:33.430 align:start position:0%
resetting it down here and then when we
pop<00:05:30.600><c> off</c><00:05:30.759><c> our</c><00:05:30.960><c> link</c><00:05:31.280><c> register</c><00:05:32.280><c> we</c><00:05:32.840><c> previously</c>

00:05:33.430 --> 00:05:33.440 align:start position:0%
pop off our link register we previously
 

00:05:33.440 --> 00:05:35.189 align:start position:0%
pop off our link register we previously
pushed<00:05:33.759><c> it</c><00:05:33.919><c> up</c><00:05:34.120><c> here</c><00:05:34.319><c> so</c><00:05:34.479><c> we're</c><00:05:34.639><c> not</c><00:05:34.840><c> affecting</c>

00:05:35.189 --> 00:05:35.199 align:start position:0%
pushed it up here so we're not affecting
 

00:05:35.199 --> 00:05:37.790 align:start position:0%
pushed it up here so we're not affecting
the<00:05:35.360><c> stack</c><00:05:35.639><c> in</c><00:05:35.759><c> any</c><00:05:36.039><c> way</c><00:05:36.600><c> so</c><00:05:36.800><c> the</c><00:05:36.919><c> next</c><00:05:37.199><c> value</c>

00:05:37.790 --> 00:05:37.800 align:start position:0%
the stack in any way so the next value
 

00:05:37.800 --> 00:05:40.110 align:start position:0%
the stack in any way so the next value
that<00:05:37.960><c> is</c><00:05:38.160><c> popped</c><00:05:38.440><c> off</c><00:05:38.639><c> the</c><00:05:38.840><c> stack</c><00:05:39.560><c> will</c><00:05:39.800><c> be</c><00:05:40.000><c> the</c>

00:05:40.110 --> 00:05:40.120 align:start position:0%
that is popped off the stack will be the
 

00:05:40.120 --> 00:05:42.590 align:start position:0%
that is popped off the stack will be the
link<00:05:40.400><c> register</c><00:05:40.880><c> one</c><00:05:41.039><c> more</c><00:05:41.319><c> time</c><00:05:42.240><c> so</c><00:05:42.400><c> now</c>

00:05:42.590 --> 00:05:42.600 align:start position:0%
link register one more time so now
 

00:05:42.600 --> 00:05:45.029 align:start position:0%
link register one more time so now
moving<00:05:42.919><c> on</c><00:05:43.280><c> we</c><00:05:43.479><c> actually</c><00:05:43.720><c> need</c><00:05:43.960><c> to</c><00:05:44.280><c> change</c><00:05:44.800><c> our</c>

00:05:45.029 --> 00:05:45.039 align:start position:0%
moving on we actually need to change our
 

00:05:45.039 --> 00:05:47.430 align:start position:0%
moving on we actually need to change our
ad<00:05:45.319><c> numbers</c><00:05:45.919><c> function</c><00:05:46.360><c> call</c><00:05:46.919><c> so</c><00:05:47.080><c> that</c><00:05:47.199><c> we're</c>

00:05:47.430 --> 00:05:47.440 align:start position:0%
ad numbers function call so that we're
 

00:05:47.440 --> 00:05:49.150 align:start position:0%
ad numbers function call so that we're
adding<00:05:47.800><c> all</c><00:05:47.960><c> of</c><00:05:48.160><c> these</c><00:05:48.360><c> different</c><00:05:48.639><c> numbers</c>

00:05:49.150 --> 00:05:49.160 align:start position:0%
adding all of these different numbers
 

00:05:49.160 --> 00:05:50.790 align:start position:0%
adding all of these different numbers
together<00:05:49.800><c> since</c><00:05:50.000><c> we</c><00:05:50.120><c> have</c><00:05:50.240><c> an</c><00:05:50.400><c> additional</c>

00:05:50.790 --> 00:05:50.800 align:start position:0%
together since we have an additional
 

00:05:50.800 --> 00:05:52.390 align:start position:0%
together since we have an additional
four<00:05:51.199><c> arguments</c><00:05:51.759><c> that</c><00:05:51.880><c> we're</c><00:05:52.000><c> going</c><00:05:52.080><c> to</c><00:05:52.240><c> be</c>

00:05:52.390 --> 00:05:52.400 align:start position:0%
four arguments that we're going to be
 

00:05:52.400 --> 00:05:54.830 align:start position:0%
four arguments that we're going to be
using<00:05:53.360><c> now</c><00:05:53.560><c> the</c><00:05:53.720><c> first</c><00:05:53.960><c> four</c><00:05:54.319><c> are</c><00:05:54.440><c> going</c><00:05:54.560><c> to</c><00:05:54.639><c> be</c>

00:05:54.830 --> 00:05:54.840 align:start position:0%
using now the first four are going to be
 

00:05:54.840 --> 00:05:57.830 align:start position:0%
using now the first four are going to be
pretty<00:05:55.120><c> easy</c><00:05:56.000><c> we've</c><00:05:56.199><c> already</c><00:05:56.479><c> got</c><00:05:56.720><c> our</c><00:05:56.919><c> r0</c><00:05:57.680><c> and</c>

00:05:57.830 --> 00:05:57.840 align:start position:0%
pretty easy we've already got our r0 and
 

00:05:57.840 --> 00:05:59.990 align:start position:0%
pretty easy we've already got our r0 and
R1<00:05:58.319><c> registers</c><00:05:58.880><c> added</c><00:05:59.240><c> together</c>

00:05:59.990 --> 00:06:00.000 align:start position:0%
R1 registers added together
 

00:06:00.000 --> 00:06:03.189 align:start position:0%
R1 registers added together
so<00:06:00.160><c> let's</c><00:06:00.360><c> just</c><00:06:00.560><c> add</c><00:06:00.759><c> the</c><00:06:00.880><c> R2</c><00:06:01.400><c> and</c><00:06:01.880><c> R3</c><00:06:02.880><c> so</c><00:06:03.000><c> we'll</c>

00:06:03.189 --> 00:06:03.199 align:start position:0%
so let's just add the R2 and R3 so we'll
 

00:06:03.199 --> 00:06:04.390 align:start position:0%
so let's just add the R2 and R3 so we'll
do

00:06:04.390 --> 00:06:04.400 align:start position:0%
do
 

00:06:04.400 --> 00:06:07.390 align:start position:0%
do
add<00:06:05.400><c> r0</c><00:06:06.000><c> is</c><00:06:06.120><c> our</c>

00:06:07.390 --> 00:06:07.400 align:start position:0%
add r0 is our
 

00:06:07.400 --> 00:06:10.230 align:start position:0%
add r0 is our
accumulator<00:06:08.440><c> r0</c><00:06:09.440><c> and</c><00:06:09.520><c> then</c><00:06:09.680><c> the</c><00:06:09.800><c> next</c><00:06:10.000><c> one</c><00:06:10.120><c> is</c>

00:06:10.230 --> 00:06:10.240 align:start position:0%
accumulator r0 and then the next one is
 

00:06:10.240 --> 00:06:11.070 align:start position:0%
accumulator r0 and then the next one is
going<00:06:10.319><c> to</c><00:06:10.440><c> be</c>

00:06:11.070 --> 00:06:11.080 align:start position:0%
going to be
 

00:06:11.080 --> 00:06:14.670 align:start position:0%
going to be
R2<00:06:12.080><c> and</c><00:06:12.199><c> we'll</c><00:06:12.360><c> do</c><00:06:12.840><c> add</c>

00:06:14.670 --> 00:06:14.680 align:start position:0%
R2 and we'll do add
 

00:06:14.680 --> 00:06:17.870 align:start position:0%
R2 and we'll do add
r0<00:06:15.680><c> r0</c><00:06:16.520><c> and</c><00:06:16.639><c> then</c>

00:06:17.870 --> 00:06:17.880 align:start position:0%
r0 r0 and then
 

00:06:17.880 --> 00:06:20.150 align:start position:0%
r0 r0 and then
R3<00:06:18.880><c> which</c><00:06:19.039><c> is</c><00:06:19.199><c> going</c><00:06:19.360><c> to</c><00:06:19.520><c> be</c><00:06:19.639><c> our</c><00:06:19.840><c> next</c>

00:06:20.150 --> 00:06:20.160 align:start position:0%
R3 which is going to be our next
 

00:06:20.160 --> 00:06:22.110 align:start position:0%
R3 which is going to be our next
argument<00:06:21.080><c> so</c><00:06:21.280><c> now</c><00:06:21.440><c> we</c><00:06:21.599><c> actually</c><00:06:21.800><c> have</c><00:06:21.919><c> to</c><00:06:22.039><c> go</c>

00:06:22.110 --> 00:06:22.120 align:start position:0%
argument so now we actually have to go
 

00:06:22.120 --> 00:06:25.029 align:start position:0%
argument so now we actually have to go
to<00:06:22.280><c> our</c><00:06:22.520><c> stack</c><00:06:22.880><c> to</c><00:06:23.080><c> get</c><00:06:23.199><c> our</c><00:06:23.560><c> next</c><00:06:24.039><c> arguments</c>

00:06:25.029 --> 00:06:25.039 align:start position:0%
to our stack to get our next arguments
 

00:06:25.039 --> 00:06:27.909 align:start position:0%
to our stack to get our next arguments
so<00:06:25.199><c> let</c><00:06:25.280><c> me</c><00:06:25.479><c> get</c><00:06:25.680><c> our</c><00:06:26.000><c> fifth</c><00:06:26.479><c> argument</c><00:06:27.080><c> next</c>

00:06:27.909 --> 00:06:27.919 align:start position:0%
so let me get our fifth argument next
 

00:06:27.919 --> 00:06:30.749 align:start position:0%
so let me get our fifth argument next
let<00:06:28.039><c> me</c><00:06:28.160><c> scroll</c><00:06:28.560><c> down</c><00:06:28.800><c> here</c><00:06:29.560><c> give</c><00:06:29.759><c> myself</c><00:06:30.080><c> some</c>

00:06:30.749 --> 00:06:30.759 align:start position:0%
let me scroll down here give myself some
 

00:06:30.759 --> 00:06:33.189 align:start position:0%
let me scroll down here give myself some
space<00:06:31.759><c> so</c><00:06:31.919><c> the</c><00:06:32.039><c> first</c><00:06:32.240><c> thing</c><00:06:32.400><c> I'm</c><00:06:32.520><c> going</c><00:06:32.639><c> to</c><00:06:32.840><c> do</c>

00:06:33.189 --> 00:06:33.199 align:start position:0%
space so the first thing I'm going to do
 

00:06:33.199 --> 00:06:35.909 align:start position:0%
space so the first thing I'm going to do
is<00:06:33.319><c> I'm</c><00:06:33.400><c> going</c><00:06:33.520><c> to</c><00:06:33.639><c> do</c><00:06:33.800><c> load</c><00:06:34.800><c> register</c><00:06:35.800><c> and</c>

00:06:35.909 --> 00:06:35.919 align:start position:0%
is I'm going to do load register and
 

00:06:35.919 --> 00:06:38.309 align:start position:0%
is I'm going to do load register and
we'll<00:06:36.120><c> just</c><00:06:36.240><c> use</c><00:06:36.479><c> R4</c><00:06:37.479><c> we'll</c><00:06:37.639><c> just</c><00:06:37.759><c> reuse</c><00:06:38.160><c> this</c>

00:06:38.309 --> 00:06:38.319 align:start position:0%
we'll just use R4 we'll just reuse this
 

00:06:38.319 --> 00:06:40.790 align:start position:0%
we'll just use R4 we'll just reuse this
as<00:06:38.440><c> a</c><00:06:38.599><c> temporary</c><00:06:39.440><c> register</c><00:06:40.440><c> and</c><00:06:40.560><c> then</c><00:06:40.680><c> we're</c>

00:06:40.790 --> 00:06:40.800 align:start position:0%
as a temporary register and then we're
 

00:06:40.800 --> 00:06:43.390 align:start position:0%
as a temporary register and then we're
going<00:06:40.919><c> to</c><00:06:41.080><c> get</c><00:06:41.240><c> the</c><00:06:41.440><c> value</c><00:06:42.280><c> from</c>

00:06:43.390 --> 00:06:43.400 align:start position:0%
going to get the value from
 

00:06:43.400 --> 00:06:45.830 align:start position:0%
going to get the value from
SP<00:06:44.400><c> and</c><00:06:44.520><c> then</c><00:06:44.599><c> we're</c><00:06:44.759><c> going</c><00:06:44.840><c> to</c><00:06:45.039><c> offset</c><00:06:45.440><c> it</c><00:06:45.639><c> by</c>

00:06:45.830 --> 00:06:45.840 align:start position:0%
SP and then we're going to offset it by
 

00:06:45.840 --> 00:06:49.670 align:start position:0%
SP and then we're going to offset it by
four<00:06:46.840><c> now</c><00:06:47.039><c> remember</c><00:06:47.479><c> SP</c><00:06:48.240><c> offset</c><00:06:48.720><c> by</c><00:06:48.880><c> four</c><00:06:49.520><c> is</c>

00:06:49.670 --> 00:06:49.680 align:start position:0%
four now remember SP offset by four is
 

00:06:49.680 --> 00:06:51.550 align:start position:0%
four now remember SP offset by four is
going<00:06:49.840><c> to</c><00:06:49.919><c> be</c><00:06:50.039><c> the</c><00:06:50.160><c> immediate</c><00:06:50.599><c> value</c><00:06:51.039><c> five</c>

00:06:51.550 --> 00:06:51.560 align:start position:0%
going to be the immediate value five
 

00:06:51.560 --> 00:06:53.230 align:start position:0%
going to be the immediate value five
which<00:06:51.639><c> is</c><00:06:51.759><c> going</c><00:06:51.840><c> to</c><00:06:51.960><c> be</c><00:06:52.080><c> our</c><00:06:52.360><c> fifth</c><00:06:52.759><c> argument</c>

00:06:53.230 --> 00:06:53.240 align:start position:0%
which is going to be our fifth argument
 

00:06:53.240 --> 00:06:55.670 align:start position:0%
which is going to be our fifth argument
and<00:06:53.479><c> not</c><00:06:53.720><c> our</c><00:06:54.000><c> last</c><00:06:54.319><c> argument</c><00:06:55.080><c> since</c><00:06:55.319><c> we</c><00:06:55.479><c> did</c>

00:06:55.670 --> 00:06:55.680 align:start position:0%
and not our last argument since we did
 

00:06:55.680 --> 00:06:58.510 align:start position:0%
and not our last argument since we did
push<00:06:55.960><c> them</c><00:06:56.160><c> in</c><00:06:56.360><c> reverse</c><00:06:57.039><c> order</c><00:06:58.039><c> so</c><00:06:58.199><c> once</c><00:06:58.360><c> we've</c>

00:06:58.510 --> 00:06:58.520 align:start position:0%
push them in reverse order so once we've
 

00:06:58.520 --> 00:07:00.390 align:start position:0%
push them in reverse order so once we've
loaded<00:06:58.840><c> our</c><00:06:59.000><c> register</c>

00:07:00.390 --> 00:07:00.400 align:start position:0%
loaded our register
 

00:07:00.400 --> 00:07:03.710 align:start position:0%
loaded our register
we<00:07:00.520><c> can</c><00:07:00.960><c> add</c><00:07:01.319><c> that</c><00:07:01.560><c> value</c><00:07:02.039><c> into</c><00:07:02.280><c> our</c><00:07:02.440><c> r0o</c>

00:07:03.710 --> 00:07:03.720 align:start position:0%
we can add that value into our r0o
 

00:07:03.720 --> 00:07:08.150 align:start position:0%
we can add that value into our r0o
register<00:07:04.720><c> so</c><00:07:04.879><c> we'll</c><00:07:05.080><c> just</c><00:07:05.199><c> do</c><00:07:06.039><c> add</c>

00:07:08.150 --> 00:07:08.160 align:start position:0%
register so we'll just do add
 

00:07:08.160 --> 00:07:09.710 align:start position:0%
register so we'll just do add
r0

00:07:09.710 --> 00:07:09.720 align:start position:0%
r0
 

00:07:09.720 --> 00:07:12.309 align:start position:0%
r0
r0<00:07:10.720><c> and</c><00:07:10.879><c> then</c><00:07:11.199><c> the</c><00:07:11.360><c> fifth</c><00:07:11.639><c> argument</c><00:07:12.080><c> which</c><00:07:12.160><c> is</c>

00:07:12.309 --> 00:07:12.319 align:start position:0%
r0 and then the fifth argument which is
 

00:07:12.319 --> 00:07:15.230 align:start position:0%
r0 and then the fifth argument which is
now<00:07:12.479><c> stored</c><00:07:12.879><c> inside</c><00:07:13.160><c> of</c><00:07:13.280><c> our</c><00:07:13.440><c> R4</c><00:07:14.120><c> register</c><00:07:15.120><c> and</c>

00:07:15.230 --> 00:07:15.240 align:start position:0%
now stored inside of our R4 register and
 

00:07:15.240 --> 00:07:17.189 align:start position:0%
now stored inside of our R4 register and
then<00:07:15.360><c> we're</c><00:07:15.520><c> going</c><00:07:15.599><c> to</c><00:07:15.759><c> do</c><00:07:15.960><c> the</c><00:07:16.240><c> same</c><00:07:16.639><c> thing</c><00:07:17.039><c> to</c>

00:07:17.189 --> 00:07:17.199 align:start position:0%
then we're going to do the same thing to
 

00:07:17.199 --> 00:07:20.189 align:start position:0%
then we're going to do the same thing to
get<00:07:17.360><c> the</c><00:07:17.639><c> last</c><00:07:18.000><c> argument</c><00:07:18.919><c> and</c><00:07:19.240><c> add</c><00:07:19.560><c> that</c><00:07:19.800><c> value</c>

00:07:20.189 --> 00:07:20.199 align:start position:0%
get the last argument and add that value
 

00:07:20.199 --> 00:07:22.469 align:start position:0%
get the last argument and add that value
as<00:07:20.440><c> well</c><00:07:21.440><c> and</c><00:07:21.639><c> one</c><00:07:21.759><c> more</c><00:07:21.960><c> time</c><00:07:22.160><c> I'm</c><00:07:22.280><c> going</c><00:07:22.360><c> to</c>

00:07:22.469 --> 00:07:22.479 align:start position:0%
as well and one more time I'm going to
 

00:07:22.479 --> 00:07:23.670 align:start position:0%
as well and one more time I'm going to
do<00:07:22.720><c> load</c>

00:07:23.670 --> 00:07:23.680 align:start position:0%
do load
 

00:07:23.680 --> 00:07:26.309 align:start position:0%
do load
register<00:07:24.680><c> just</c><00:07:24.840><c> reuse</c>

00:07:26.309 --> 00:07:26.319 align:start position:0%
register just reuse
 

00:07:26.319 --> 00:07:28.270 align:start position:0%
register just reuse
R4<00:07:27.319><c> and</c><00:07:27.400><c> then</c><00:07:27.520><c> we're</c><00:07:27.639><c> going</c><00:07:27.720><c> to</c><00:07:27.840><c> load</c><00:07:28.080><c> the</c>

00:07:28.270 --> 00:07:28.280 align:start position:0%
R4 and then we're going to load the
 

00:07:28.280 --> 00:07:30.510 align:start position:0%
R4 and then we're going to load the
value<00:07:28.759><c> that's</c><00:07:29.000><c> in</c><00:07:29.440><c> SP</c><00:07:29.960><c> which</c><00:07:30.080><c> is</c><00:07:30.160><c> going</c><00:07:30.280><c> to</c><00:07:30.400><c> be</c>

00:07:30.510 --> 00:07:30.520 align:start position:0%
value that's in SP which is going to be
 

00:07:30.520 --> 00:07:33.029 align:start position:0%
value that's in SP which is going to be
the<00:07:30.720><c> last</c><00:07:31.080><c> argument</c><00:07:32.039><c> that</c><00:07:32.160><c> we</c><00:07:32.319><c> pushed</c><00:07:32.560><c> in</c><00:07:32.759><c> here</c>

00:07:33.029 --> 00:07:33.039 align:start position:0%
the last argument that we pushed in here
 

00:07:33.039 --> 00:07:35.909 align:start position:0%
the last argument that we pushed in here
which<00:07:33.160><c> should</c><00:07:33.319><c> be</c><00:07:33.479><c> the</c><00:07:33.639><c> immediate</c><00:07:34.120><c> value</c><00:07:34.919><c> six</c>

00:07:35.909 --> 00:07:35.919 align:start position:0%
which should be the immediate value six
 

00:07:35.919 --> 00:07:37.710 align:start position:0%
which should be the immediate value six
and<00:07:36.039><c> we'll</c><00:07:36.280><c> just</c><00:07:36.520><c> add</c><00:07:36.759><c> that</c><00:07:36.919><c> to</c><00:07:37.080><c> finish</c><00:07:37.479><c> this</c>

00:07:37.710 --> 00:07:37.720 align:start position:0%
and we'll just add that to finish this
 

00:07:37.720 --> 00:07:41.189 align:start position:0%
and we'll just add that to finish this
off<00:07:38.560><c> so</c><00:07:38.720><c> I'm</c><00:07:38.800><c> going</c><00:07:38.919><c> do</c><00:07:39.360><c> add</c>

00:07:41.189 --> 00:07:41.199 align:start position:0%
off so I'm going do add
 

00:07:41.199 --> 00:07:46.110 align:start position:0%
off so I'm going do add
r0<00:07:42.479><c> r0</c><00:07:43.479><c> and</c><00:07:43.599><c> then</c><00:07:43.759><c> R4</c><00:07:44.400><c> one</c><00:07:44.560><c> more</c><00:07:44.800><c> time</c><00:07:45.759><c> so</c><00:07:45.960><c> this</c>

00:07:46.110 --> 00:07:46.120 align:start position:0%
r0 r0 and then R4 one more time so this
 

00:07:46.120 --> 00:07:47.070 align:start position:0%
r0 r0 and then R4 one more time so this
looks<00:07:46.360><c> good</c><00:07:46.560><c> and</c><00:07:46.680><c> then</c><00:07:46.759><c> we're</c><00:07:46.879><c> going</c><00:07:46.960><c> to</c>

00:07:47.070 --> 00:07:47.080 align:start position:0%
looks good and then we're going to
 

00:07:47.080 --> 00:07:48.749 align:start position:0%
looks good and then we're going to
Branch<00:07:47.400><c> out</c><00:07:47.560><c> of</c><00:07:47.680><c> our</c><00:07:47.879><c> function</c><00:07:48.360><c> after</c><00:07:48.560><c> we</c>

00:07:48.749 --> 00:07:48.759 align:start position:0%
Branch out of our function after we
 

00:07:48.759 --> 00:07:50.830 align:start position:0%
Branch out of our function after we
finish<00:07:49.159><c> this</c><00:07:49.680><c> so</c><00:07:49.840><c> let's</c><00:07:50.039><c> run</c><00:07:50.319><c> this</c><00:07:50.479><c> and</c><00:07:50.599><c> see</c>

00:07:50.830 --> 00:07:50.840 align:start position:0%
finish this so let's run this and see
 

00:07:50.840 --> 00:07:52.510 align:start position:0%
finish this so let's run this and see
what<00:07:51.000><c> this</c><00:07:51.159><c> looks</c><00:07:51.440><c> like</c><00:07:51.919><c> so</c><00:07:52.039><c> now</c><00:07:52.159><c> I'm</c><00:07:52.240><c> going</c><00:07:52.360><c> to</c>

00:07:52.510 --> 00:07:52.520 align:start position:0%
what this looks like so now I'm going to
 

00:07:52.520 --> 00:07:54.830 align:start position:0%
what this looks like so now I'm going to
compile<00:07:52.879><c> and</c><00:07:53.039><c> load</c><00:07:53.400><c> this</c><00:07:53.639><c> program</c><00:07:54.520><c> it</c><00:07:54.639><c> looks</c>

00:07:54.830 --> 00:07:54.840 align:start position:0%
compile and load this program it looks
 

00:07:54.840 --> 00:07:56.309 align:start position:0%
compile and load this program it looks
like<00:07:54.960><c> I</c><00:07:55.039><c> didn't</c><00:07:55.280><c> type</c><00:07:55.520><c> anything</c><00:07:55.879><c> wrong</c><00:07:56.120><c> so</c>

00:07:56.309 --> 00:07:56.319 align:start position:0%
like I didn't type anything wrong so
 

00:07:56.319 --> 00:07:58.550 align:start position:0%
like I didn't type anything wrong so
that's<00:07:56.599><c> good</c><00:07:57.440><c> and</c><00:07:57.599><c> I'm</c><00:07:57.720><c> going</c><00:07:57.800><c> to</c><00:07:58.000><c> maneuver</c>

00:07:58.550 --> 00:07:58.560 align:start position:0%
that's good and I'm going to maneuver
 

00:07:58.560 --> 00:08:00.950 align:start position:0%
that's good and I'm going to maneuver
over<00:07:58.840><c> to</c><00:07:59.000><c> the</c><00:07:59.319><c> current</c><00:07:59.800><c> memory</c><00:08:00.639><c> and</c><00:08:00.759><c> let's</c>

00:08:00.950 --> 00:08:00.960 align:start position:0%
over to the current memory and let's
 

00:08:00.960 --> 00:08:02.670 align:start position:0%
over to the current memory and let's
take<00:08:01.080><c> a</c><00:08:01.240><c> look</c><00:08:01.360><c> at</c><00:08:01.520><c> what</c><00:08:01.639><c> the</c><00:08:01.800><c> stack</c><00:08:02.159><c> pointer</c><00:08:02.520><c> is</c>

00:08:02.670 --> 00:08:02.680 align:start position:0%
take a look at what the stack pointer is
 

00:08:02.680 --> 00:08:04.909 align:start position:0%
take a look at what the stack pointer is
doing<00:08:03.440><c> if</c><00:08:03.560><c> you</c><00:08:03.680><c> see</c><00:08:03.960><c> currently</c><00:08:04.360><c> it's</c><00:08:04.560><c> just</c><00:08:04.680><c> set</c>

00:08:04.909 --> 00:08:04.919 align:start position:0%
doing if you see currently it's just set
 

00:08:04.919 --> 00:08:07.510 align:start position:0%
doing if you see currently it's just set
to<00:08:05.240><c> position</c><00:08:05.680><c> zero</c><00:08:06.440><c> so</c><00:08:06.599><c> let</c><00:08:06.720><c> me</c><00:08:06.840><c> put</c><00:08:06.960><c> in</c><00:08:07.159><c> stack</c>

00:08:07.510 --> 00:08:07.520 align:start position:0%
to position zero so let me put in stack
 

00:08:07.520 --> 00:08:09.469 align:start position:0%
to position zero so let me put in stack
pointer<00:08:08.440><c> so</c><00:08:08.599><c> we</c><00:08:08.680><c> can</c><00:08:08.840><c> take</c><00:08:08.960><c> a</c><00:08:09.080><c> look</c><00:08:09.240><c> at</c><00:08:09.360><c> what</c>

00:08:09.469 --> 00:08:09.479 align:start position:0%
pointer so we can take a look at what
 

00:08:09.479 --> 00:08:10.990 align:start position:0%
pointer so we can take a look at what
it's<00:08:09.639><c> pointing</c><00:08:09.960><c> to</c><00:08:10.280><c> right</c><00:08:10.400><c> now</c><00:08:10.680><c> just</c><00:08:10.800><c> looks</c>

00:08:10.990 --> 00:08:11.000 align:start position:0%
it's pointing to right now just looks
 

00:08:11.000 --> 00:08:13.830 align:start position:0%
it's pointing to right now just looks
like<00:08:11.159><c> some</c><00:08:11.400><c> junk</c><00:08:11.759><c> stuff</c><00:08:12.440><c> whatever</c><00:08:13.440><c> and</c><00:08:13.639><c> let's</c>

00:08:13.830 --> 00:08:13.840 align:start position:0%
like some junk stuff whatever and let's
 

00:08:13.840 --> 00:08:15.749 align:start position:0%
like some junk stuff whatever and let's
go<00:08:14.000><c> back</c><00:08:14.120><c> to</c><00:08:14.240><c> our</c><00:08:14.400><c> disassembly</c><00:08:15.000><c> and</c><00:08:15.159><c> see</c><00:08:15.520><c> how</c>

00:08:15.749 --> 00:08:15.759 align:start position:0%
go back to our disassembly and see how
 

00:08:15.759 --> 00:08:18.110 align:start position:0%
go back to our disassembly and see how
the<00:08:15.919><c> stack</c><00:08:16.240><c> pointer</c><00:08:16.680><c> actually</c><00:08:17.000><c> gets</c><00:08:17.319><c> updated</c>

00:08:18.110 --> 00:08:18.120 align:start position:0%
the stack pointer actually gets updated
 

00:08:18.120 --> 00:08:19.670 align:start position:0%
the stack pointer actually gets updated
while<00:08:18.280><c> we're</c><00:08:18.479><c> going</c><00:08:18.759><c> through</c><00:08:19.000><c> and</c><00:08:19.159><c> adding</c><00:08:19.440><c> our</c>

00:08:19.670 --> 00:08:19.680 align:start position:0%
while we're going through and adding our
 

00:08:19.680 --> 00:08:22.070 align:start position:0%
while we're going through and adding our
values<00:08:20.159><c> to</c><00:08:20.360><c> the</c><00:08:20.599><c> stack</c><00:08:21.599><c> so</c><00:08:21.720><c> I'm</c><00:08:21.800><c> going</c><00:08:21.879><c> to</c><00:08:22.000><c> go</c>

00:08:22.070 --> 00:08:22.080 align:start position:0%
values to the stack so I'm going to go
 

00:08:22.080 --> 00:08:25.309 align:start position:0%
values to the stack so I'm going to go
to<00:08:22.199><c> our</c><00:08:22.599><c> disassembly</c><00:08:23.599><c> let's</c><00:08:23.800><c> do</c><00:08:24.159><c> step</c><00:08:24.479><c> over</c>

00:08:25.309 --> 00:08:25.319 align:start position:0%
to our disassembly let's do step over
 

00:08:25.319 --> 00:08:26.790 align:start position:0%
to our disassembly let's do step over
and<00:08:25.440><c> you'll</c><00:08:25.599><c> notice</c><00:08:25.879><c> something</c><00:08:26.159><c> interesting</c>

00:08:26.790 --> 00:08:26.800 align:start position:0%
and you'll notice something interesting
 

00:08:26.800 --> 00:08:28.629 align:start position:0%
and you'll notice something interesting
first<00:08:26.960><c> of</c><00:08:27.080><c> all</c><00:08:27.240><c> the</c><00:08:27.479><c> push</c><00:08:27.800><c> instruction</c><00:08:28.400><c> is</c>

00:08:28.629 --> 00:08:28.639 align:start position:0%
first of all the push instruction is
 

00:08:28.639 --> 00:08:31.629 align:start position:0%
first of all the push instruction is
already<00:08:29.639><c> modifying</c><00:08:30.159><c> our</c><00:08:30.400><c> stack</c><00:08:30.759><c> pointer</c><00:08:31.520><c> so</c>

00:08:31.629 --> 00:08:31.639 align:start position:0%
already modifying our stack pointer so
 

00:08:31.639 --> 00:08:34.589 align:start position:0%
already modifying our stack pointer so
if<00:08:31.759><c> we</c><00:08:31.919><c> take</c><00:08:32.200><c> this</c><00:08:32.479><c> and</c><00:08:32.599><c> we</c><00:08:32.760><c> look</c><00:08:32.919><c> at</c><00:08:33.080><c> it</c><00:08:33.839><c> in</c>

00:08:34.589 --> 00:08:34.599 align:start position:0%
if we take this and we look at it in
 

00:08:34.599 --> 00:08:36.230 align:start position:0%
if we take this and we look at it in
signed<00:08:35.200><c> decimal</c><00:08:35.680><c> you</c><00:08:35.760><c> can</c><00:08:35.880><c> see</c><00:08:36.039><c> it's</c>

00:08:36.230 --> 00:08:36.240 align:start position:0%
signed decimal you can see it's
 

00:08:36.240 --> 00:08:39.269 align:start position:0%
signed decimal you can see it's
subtracting<00:08:36.839><c> four</c><00:08:37.440><c> already</c><00:08:38.320><c> so</c><00:08:38.519><c> now</c><00:08:38.680><c> our</c><00:08:38.919><c> sub</c>

00:08:39.269 --> 00:08:39.279 align:start position:0%
subtracting four already so now our sub
 

00:08:39.279 --> 00:08:41.190 align:start position:0%
subtracting four already so now our sub
command<00:08:39.719><c> over</c><00:08:40.000><c> here</c><00:08:40.279><c> is</c><00:08:40.519><c> also</c><00:08:40.800><c> going</c><00:08:40.919><c> to</c><00:08:41.039><c> be</c>

00:08:41.190 --> 00:08:41.200 align:start position:0%
command over here is also going to be
 

00:08:41.200 --> 00:08:43.509 align:start position:0%
command over here is also going to be
subtracting<00:08:41.800><c> from</c><00:08:42.039><c> the</c><00:08:42.200><c> stack</c><00:08:42.560><c> pointer</c><00:08:43.360><c> but</c>

00:08:43.509 --> 00:08:43.519 align:start position:0%
subtracting from the stack pointer but
 

00:08:43.519 --> 00:08:45.630 align:start position:0%
subtracting from the stack pointer but
the<00:08:43.680><c> push</c><00:08:44.039><c> and</c><00:08:44.279><c> pop</c><00:08:44.600><c> commands</c><00:08:45.240><c> do</c><00:08:45.440><c> those</c>

00:08:45.630 --> 00:08:45.640 align:start position:0%
the push and pop commands do those
 

00:08:45.640 --> 00:08:47.430 align:start position:0%
the push and pop commands do those
automatically<00:08:46.600><c> now</c><00:08:46.720><c> let's</c><00:08:46.920><c> go</c><00:08:47.040><c> over</c><00:08:47.200><c> to</c>

00:08:47.430 --> 00:08:47.440 align:start position:0%
automatically now let's go over to
 

00:08:47.440 --> 00:08:49.670 align:start position:0%
automatically now let's go over to
memory<00:08:47.920><c> and</c><00:08:48.080><c> see</c><00:08:48.399><c> that</c><00:08:48.560><c> we</c><00:08:48.800><c> have</c><00:08:49.240><c> actually</c>

00:08:49.670 --> 00:08:49.680 align:start position:0%
memory and see that we have actually
 

00:08:49.680 --> 00:08:53.430 align:start position:0%
memory and see that we have actually
changed<00:08:50.320><c> our</c><00:08:50.560><c> stack</c><00:08:50.880><c> pointer</c><00:08:51.320><c> pointing</c><00:08:51.640><c> to</c><00:08:52.440><c> -4</c>

00:08:53.430 --> 00:08:53.440 align:start position:0%
changed our stack pointer pointing to -4
 

00:08:53.440 --> 00:08:54.790 align:start position:0%
changed our stack pointer pointing to -4
so<00:08:53.600><c> let's</c><00:08:53.800><c> go</c><00:08:53.959><c> through</c><00:08:54.200><c> and</c><00:08:54.360><c> let's</c><00:08:54.519><c> see</c><00:08:54.680><c> what</c>

00:08:54.790 --> 00:08:54.800 align:start position:0%
so let's go through and let's see what
 

00:08:54.800 --> 00:08:56.350 align:start position:0%
so let's go through and let's see what
it<00:08:54.920><c> looks</c><00:08:55.160><c> like</c><00:08:55.360><c> when</c><00:08:55.480><c> we're</c><00:08:55.720><c> changing</c><00:08:56.160><c> and</c>

00:08:56.350 --> 00:08:56.360 align:start position:0%
it looks like when we're changing and
 

00:08:56.360 --> 00:08:58.710 align:start position:0%
it looks like when we're changing and
pushing<00:08:56.640><c> our</c><00:08:56.880><c> arguments</c><00:08:57.800><c> to</c><00:08:58.040><c> the</c><00:08:58.200><c> stack</c><00:08:58.560><c> as</c>

00:08:58.710 --> 00:08:58.720 align:start position:0%
pushing our arguments to the stack as
 

00:08:58.720 --> 00:08:59.750 align:start position:0%
pushing our arguments to the stack as
well

00:08:59.750 --> 00:08:59.760 align:start position:0%
well
 

00:08:59.760 --> 00:09:01.350 align:start position:0%
well
now<00:09:00.000><c> first</c><00:09:00.160><c> of</c><00:09:00.320><c> all</c><00:09:00.480><c> let's</c><00:09:00.720><c> just</c><00:09:00.920><c> add</c><00:09:01.120><c> our</c>

00:09:01.350 --> 00:09:01.360 align:start position:0%
now first of all let's just add our
 

00:09:01.360 --> 00:09:03.870 align:start position:0%
now first of all let's just add our
previous<00:09:01.760><c> arguments</c><00:09:02.279><c> so</c><00:09:02.560><c> r0</c><00:09:03.160><c> through</c><00:09:03.360><c> R3</c>

00:09:03.870 --> 00:09:03.880 align:start position:0%
previous arguments so r0 through R3
 

00:09:03.880 --> 00:09:07.430 align:start position:0%
previous arguments so r0 through R3
registers<00:09:04.880><c> so</c><00:09:05.000><c> we</c><00:09:05.160><c> do</c><00:09:05.360><c> step</c><00:09:05.800><c> over</c><00:09:06.800><c> step</c><00:09:07.079><c> over</c>

00:09:07.430 --> 00:09:07.440 align:start position:0%
registers so we do step over step over
 

00:09:07.440 --> 00:09:09.150 align:start position:0%
registers so we do step over step over
step<00:09:07.760><c> over</c><00:09:08.040><c> step</c><00:09:08.320><c> over</c><00:09:08.720><c> these</c><00:09:08.839><c> are</c><00:09:08.959><c> going</c><00:09:09.040><c> to</c>

00:09:09.150 --> 00:09:09.160 align:start position:0%
step over step over these are going to
 

00:09:09.160 --> 00:09:11.190 align:start position:0%
step over step over these are going to
be<00:09:09.240><c> our</c><00:09:09.360><c> first</c><00:09:09.600><c> four</c><00:09:09.880><c> arguments</c><00:09:10.880><c> and</c><00:09:11.040><c> now</c>

00:09:11.190 --> 00:09:11.200 align:start position:0%
be our first four arguments and now
 

00:09:11.200 --> 00:09:13.470 align:start position:0%
be our first four arguments and now
we're<00:09:11.360><c> going</c><00:09:11.440><c> to</c><00:09:11.600><c> subtract</c><00:09:12.240><c> 8</c><00:09:12.640><c> bytes</c><00:09:13.120><c> from</c><00:09:13.320><c> the</c>

00:09:13.470 --> 00:09:13.480 align:start position:0%
we're going to subtract 8 bytes from the
 

00:09:13.480 --> 00:09:16.069 align:start position:0%
we're going to subtract 8 bytes from the
current<00:09:13.760><c> stack</c><00:09:14.360><c> pointer</c><00:09:15.360><c> so</c><00:09:15.480><c> we'll</c><00:09:15.600><c> do</c><00:09:15.800><c> step</c>

00:09:16.069 --> 00:09:16.079 align:start position:0%
current stack pointer so we'll do step
 

00:09:16.079 --> 00:09:18.030 align:start position:0%
current stack pointer so we'll do step
over<00:09:16.560><c> now</c><00:09:16.680><c> you</c><00:09:16.760><c> see</c><00:09:16.959><c> our</c><00:09:17.120><c> stack</c><00:09:17.440><c> pointer</c><00:09:17.880><c> is</c>

00:09:18.030 --> 00:09:18.040 align:start position:0%
over now you see our stack pointer is
 

00:09:18.040 --> 00:09:21.110 align:start position:0%
over now you see our stack pointer is
actually<00:09:18.279><c> the</c><00:09:18.440><c> value</c><00:09:19.279><c> -12</c><00:09:20.279><c> so</c><00:09:20.560><c> now</c><00:09:20.800><c> we</c><00:09:20.920><c> have</c>

00:09:21.110 --> 00:09:21.120 align:start position:0%
actually the value -12 so now we have
 

00:09:21.120 --> 00:09:23.350 align:start position:0%
actually the value -12 so now we have
actually<00:09:21.440><c> allocated</c><00:09:22.160><c> additional</c><00:09:22.720><c> space</c><00:09:23.200><c> on</c>

00:09:23.350 --> 00:09:23.360 align:start position:0%
actually allocated additional space on
 

00:09:23.360 --> 00:09:26.110 align:start position:0%
actually allocated additional space on
the<00:09:23.560><c> stack</c><00:09:24.160><c> so</c><00:09:24.360><c> we</c><00:09:24.480><c> can</c><00:09:24.800><c> put</c><00:09:25.000><c> our</c><00:09:25.240><c> arguments</c><00:09:25.920><c> in</c>

00:09:26.110 --> 00:09:26.120 align:start position:0%
the stack so we can put our arguments in
 

00:09:26.120 --> 00:09:28.590 align:start position:0%
the stack so we can put our arguments in
these<00:09:26.360><c> new</c><00:09:26.839><c> locations</c><00:09:27.839><c> so</c><00:09:28.040><c> let's</c><00:09:28.200><c> see</c><00:09:28.440><c> what</c>

00:09:28.590 --> 00:09:28.600 align:start position:0%
these new locations so let's see what
 

00:09:28.600 --> 00:09:31.790 align:start position:0%
these new locations so let's see what
that<00:09:28.720><c> looks</c><00:09:28.959><c> like</c><00:09:29.560><c> we'll</c><00:09:29.720><c> do</c><00:09:30.040><c> step</c><00:09:30.680><c> over</c><00:09:31.680><c> and</c>

00:09:31.790 --> 00:09:31.800 align:start position:0%
that looks like we'll do step over and
 

00:09:31.800 --> 00:09:34.470 align:start position:0%
that looks like we'll do step over and
then<00:09:31.920><c> we're</c><00:09:32.120><c> storing</c><00:09:32.839><c> the</c><00:09:33.000><c> immediate</c><00:09:33.440><c> value</c>

00:09:34.470 --> 00:09:34.480 align:start position:0%
then we're storing the immediate value
 

00:09:34.480 --> 00:09:36.430 align:start position:0%
then we're storing the immediate value
six<00:09:35.480><c> and</c><00:09:35.600><c> now</c><00:09:35.720><c> we're</c><00:09:35.839><c> going</c><00:09:35.959><c> to</c><00:09:36.040><c> store</c><00:09:36.320><c> the</c>

00:09:36.430 --> 00:09:36.440 align:start position:0%
six and now we're going to store the
 

00:09:36.440 --> 00:09:39.150 align:start position:0%
six and now we're going to store the
immediate<00:09:36.800><c> value</c><00:09:37.200><c> five</c><00:09:37.560><c> as</c><00:09:37.760><c> well</c><00:09:38.519><c> step</c><00:09:38.800><c> over</c>

00:09:39.150 --> 00:09:39.160 align:start position:0%
immediate value five as well step over
 

00:09:39.160 --> 00:09:41.670 align:start position:0%
immediate value five as well step over
step<00:09:39.480><c> over</c><00:09:40.480><c> we'll</c><00:09:40.680><c> go</c><00:09:40.880><c> back</c><00:09:41.000><c> to</c><00:09:41.200><c> memory</c><00:09:41.560><c> and</c>

00:09:41.670 --> 00:09:41.680 align:start position:0%
step over we'll go back to memory and
 

00:09:41.680 --> 00:09:43.150 align:start position:0%
step over we'll go back to memory and
let's<00:09:41.839><c> see</c><00:09:42.000><c> what</c><00:09:42.120><c> the</c><00:09:42.240><c> stack</c><00:09:42.519><c> pointer</c><00:09:42.920><c> looks</c>

00:09:43.150 --> 00:09:43.160 align:start position:0%
let's see what the stack pointer looks
 

00:09:43.160 --> 00:09:45.710 align:start position:0%
let's see what the stack pointer looks
like<00:09:43.480><c> now</c><00:09:44.240><c> you</c><00:09:44.360><c> see</c><00:09:44.680><c> on</c><00:09:44.920><c> the</c><00:09:45.200><c> stack</c><00:09:45.560><c> we're</c>

00:09:45.710 --> 00:09:45.720 align:start position:0%
like now you see on the stack we're
 

00:09:45.720 --> 00:09:47.590 align:start position:0%
like now you see on the stack we're
going<00:09:45.800><c> to</c><00:09:45.920><c> be</c><00:09:46.040><c> pointing</c><00:09:46.360><c> to</c><00:09:46.519><c> the</c><00:09:46.720><c> next</c><00:09:47.160><c> value</c>

00:09:47.590 --> 00:09:47.600 align:start position:0%
going to be pointing to the next value
 

00:09:47.600 --> 00:09:49.550 align:start position:0%
going to be pointing to the next value
which<00:09:47.720><c> is</c><00:09:47.800><c> going</c><00:09:47.920><c> to</c><00:09:48.000><c> be</c><00:09:48.240><c> six</c><00:09:49.000><c> but</c><00:09:49.160><c> we</c><00:09:49.279><c> also</c>

00:09:49.550 --> 00:09:49.560 align:start position:0%
which is going to be six but we also
 

00:09:49.560 --> 00:09:51.069 align:start position:0%
which is going to be six but we also
have<00:09:49.800><c> six</c><00:09:50.160><c> which</c><00:09:50.279><c> is</c><00:09:50.360><c> going</c><00:09:50.440><c> to</c><00:09:50.560><c> be</c><00:09:50.640><c> the</c><00:09:50.800><c> last</c>

00:09:51.069 --> 00:09:51.079 align:start position:0%
have six which is going to be the last
 

00:09:51.079 --> 00:09:53.509 align:start position:0%
have six which is going to be the last
argument<00:09:52.079><c> five</c><00:09:52.640><c> and</c><00:09:52.760><c> then</c><00:09:52.920><c> the</c><00:09:53.160><c> other</c>

00:09:53.509 --> 00:09:53.519 align:start position:0%
argument five and then the other
 

00:09:53.519 --> 00:09:55.430 align:start position:0%
argument five and then the other
argument<00:09:53.959><c> which</c><00:09:54.079><c> was</c><00:09:54.240><c> the</c><00:09:54.360><c> link</c><00:09:54.680><c> register</c>

00:09:55.430 --> 00:09:55.440 align:start position:0%
argument which was the link register
 

00:09:55.440 --> 00:09:57.829 align:start position:0%
argument which was the link register
that<00:09:55.560><c> we</c><00:09:55.800><c> previously</c><00:09:56.360><c> pushed</c><00:09:56.680><c> onto</c><00:09:57.120><c> here</c><00:09:57.680><c> so</c>

00:09:57.829 --> 00:09:57.839 align:start position:0%
that we previously pushed onto here so
 

00:09:57.839 --> 00:09:59.269 align:start position:0%
that we previously pushed onto here so
now<00:09:58.000><c> we</c><00:09:58.160><c> have</c><00:09:58.440><c> all</c><00:09:58.640><c> three</c><00:09:58.839><c> of</c><00:09:58.959><c> these</c><00:09:59.120><c> these</c>

00:09:59.269 --> 00:09:59.279 align:start position:0%
now we have all three of these these
 

00:09:59.279 --> 00:10:01.590 align:start position:0%
now we have all three of these these
additional<00:09:59.760><c> values</c><00:10:00.200><c> stored</c><00:10:00.680><c> successfully</c><00:10:01.399><c> on</c>

00:10:01.590 --> 00:10:01.600 align:start position:0%
additional values stored successfully on
 

00:10:01.600 --> 00:10:04.030 align:start position:0%
additional values stored successfully on
the<00:10:02.079><c> stack</c><00:10:03.079><c> now</c><00:10:03.240><c> let's</c><00:10:03.440><c> go</c><00:10:03.600><c> back</c><00:10:03.720><c> to</c><00:10:03.880><c> our</c>

00:10:04.030 --> 00:10:04.040 align:start position:0%
the stack now let's go back to our
 

00:10:04.040 --> 00:10:05.509 align:start position:0%
the stack now let's go back to our
disassembly<00:10:04.720><c> and</c><00:10:04.839><c> let's</c><00:10:05.000><c> see</c><00:10:05.200><c> what</c><00:10:05.360><c> this</c>

00:10:05.509 --> 00:10:05.519 align:start position:0%
disassembly and let's see what this
 

00:10:05.519 --> 00:10:08.110 align:start position:0%
disassembly and let's see what this
looks<00:10:05.760><c> like</c><00:10:06.120><c> inside</c><00:10:06.519><c> of</c><00:10:06.680><c> the</c><00:10:06.800><c> function</c><00:10:07.240><c> call</c>

00:10:08.110 --> 00:10:08.120 align:start position:0%
looks like inside of the function call
 

00:10:08.120 --> 00:10:10.030 align:start position:0%
looks like inside of the function call
so<00:10:08.240><c> I'm</c><00:10:08.360><c> going</c><00:10:08.440><c> to</c><00:10:08.640><c> do</c><00:10:08.920><c> step</c><00:10:09.160><c> into</c><00:10:09.640><c> so</c><00:10:09.760><c> we</c><00:10:09.880><c> can</c>

00:10:10.030 --> 00:10:10.040 align:start position:0%
so I'm going to do step into so we can
 

00:10:10.040 --> 00:10:12.790 align:start position:0%
so I'm going to do step into so we can
actually<00:10:10.320><c> see</c><00:10:10.720><c> the</c><00:10:10.880><c> add</c><00:10:11.120><c> numbers</c><00:10:11.519><c> function</c><00:10:11.880><c> at</c>

00:10:12.790 --> 00:10:12.800 align:start position:0%
actually see the add numbers function at
 

00:10:12.800 --> 00:10:16.150 align:start position:0%
actually see the add numbers function at
work<00:10:13.800><c> and</c><00:10:13.920><c> we'll</c><00:10:14.079><c> do</c><00:10:14.399><c> step</c><00:10:14.720><c> over</c><00:10:15.600><c> step</c><00:10:15.880><c> over</c>

00:10:16.150 --> 00:10:16.160 align:start position:0%
work and we'll do step over step over
 

00:10:16.160 --> 00:10:18.790 align:start position:0%
work and we'll do step over step over
we're<00:10:16.320><c> adding</c><00:10:16.600><c> our</c><00:10:16.800><c> first</c><00:10:17.120><c> numbers</c><00:10:17.800><c> together</c>

00:10:18.790 --> 00:10:18.800 align:start position:0%
we're adding our first numbers together
 

00:10:18.800 --> 00:10:21.550 align:start position:0%
we're adding our first numbers together
step<00:10:19.160><c> over</c><00:10:19.959><c> and</c><00:10:20.120><c> now</c><00:10:20.279><c> we're</c><00:10:20.519><c> loading</c><00:10:21.360><c> the</c>

00:10:21.550 --> 00:10:21.560 align:start position:0%
step over and now we're loading the
 

00:10:21.560 --> 00:10:24.269 align:start position:0%
step over and now we're loading the
value<00:10:21.920><c> that's</c><00:10:22.200><c> offset</c><00:10:22.640><c> by</c><00:10:22.800><c> 4</c><00:10:23.200><c> bytes</c><00:10:23.880><c> from</c><00:10:24.120><c> the</c>

00:10:24.269 --> 00:10:24.279 align:start position:0%
value that's offset by 4 bytes from the
 

00:10:24.279 --> 00:10:26.269 align:start position:0%
value that's offset by 4 bytes from the
stack<00:10:24.640><c> pointer</c><00:10:25.200><c> so</c><00:10:25.360><c> that's</c><00:10:25.519><c> going</c><00:10:25.640><c> to</c><00:10:25.800><c> be</c><00:10:26.040><c> the</c>

00:10:26.269 --> 00:10:26.279 align:start position:0%
stack pointer so that's going to be the
 

00:10:26.279 --> 00:10:27.910 align:start position:0%
stack pointer so that's going to be the
fifth<00:10:26.640><c> argument</c><00:10:27.079><c> that</c><00:10:27.200><c> we're</c><00:10:27.320><c> loading</c><00:10:27.680><c> into</c>

00:10:27.910 --> 00:10:27.920 align:start position:0%
fifth argument that we're loading into
 

00:10:27.920 --> 00:10:29.990 align:start position:0%
fifth argument that we're loading into
the<00:10:28.040><c> R4</c><00:10:28.560><c> register</c>

00:10:29.990 --> 00:10:30.000 align:start position:0%
the R4 register
 

00:10:30.000 --> 00:10:32.630 align:start position:0%
the R4 register
I'm<00:10:30.120><c> going</c><00:10:30.200><c> to</c><00:10:30.279><c> do</c><00:10:30.480><c> step</c><00:10:30.760><c> over</c><00:10:31.720><c> R4</c><00:10:32.200><c> was</c><00:10:32.320><c> already</c>

00:10:32.630 --> 00:10:32.640 align:start position:0%
I'm going to do step over R4 was already
 

00:10:32.640 --> 00:10:36.150 align:start position:0%
I'm going to do step over R4 was already
the<00:10:32.880><c> value</c><00:10:33.720><c> five</c><00:10:34.720><c> and</c><00:10:35.079><c> we</c><00:10:35.200><c> are</c><00:10:35.399><c> going</c><00:10:35.560><c> to</c><00:10:35.880><c> add</c>

00:10:36.150 --> 00:10:36.160 align:start position:0%
the value five and we are going to add
 

00:10:36.160 --> 00:10:38.710 align:start position:0%
the value five and we are going to add
that<00:10:36.360><c> value</c><00:10:36.720><c> five</c><00:10:37.079><c> to</c><00:10:37.240><c> our</c><00:10:37.519><c> accumulator</c><00:10:38.519><c> we'll</c>

00:10:38.710 --> 00:10:38.720 align:start position:0%
that value five to our accumulator we'll
 

00:10:38.720 --> 00:10:40.910 align:start position:0%
that value five to our accumulator we'll
do<00:10:38.920><c> step</c><00:10:39.160><c> over</c><00:10:40.040><c> and</c><00:10:40.120><c> now</c><00:10:40.240><c> we're</c><00:10:40.360><c> going</c><00:10:40.480><c> to</c><00:10:40.600><c> load</c>

00:10:40.910 --> 00:10:40.920 align:start position:0%
do step over and now we're going to load
 

00:10:40.920 --> 00:10:42.910 align:start position:0%
do step over and now we're going to load
the<00:10:41.240><c> last</c><00:10:41.560><c> argument</c><00:10:42.120><c> from</c><00:10:42.320><c> the</c><00:10:42.480><c> stack</c><00:10:42.839><c> which</c>

00:10:42.910 --> 00:10:42.920 align:start position:0%
the last argument from the stack which
 

00:10:42.920 --> 00:10:45.190 align:start position:0%
the last argument from the stack which
is<00:10:43.040><c> going</c><00:10:43.120><c> to</c><00:10:43.240><c> be</c><00:10:43.360><c> the</c><00:10:43.480><c> value</c>

00:10:45.190 --> 00:10:45.200 align:start position:0%
is going to be the value
 

00:10:45.200 --> 00:10:48.110 align:start position:0%
is going to be the value
six<00:10:46.200><c> and</c><00:10:46.360><c> that</c><00:10:46.480><c> is</c><00:10:46.760><c> sure</c><00:10:47.079><c> enough</c><00:10:47.560><c> put</c><00:10:47.839><c> inside</c>

00:10:48.110 --> 00:10:48.120 align:start position:0%
six and that is sure enough put inside
 

00:10:48.120 --> 00:10:50.230 align:start position:0%
six and that is sure enough put inside
of<00:10:48.240><c> the</c><00:10:48.360><c> R4</c><00:10:48.839><c> register</c><00:10:49.760><c> then</c><00:10:49.839><c> we're</c><00:10:49.959><c> going</c><00:10:50.079><c> to</c>

00:10:50.230 --> 00:10:50.240 align:start position:0%
of the R4 register then we're going to
 

00:10:50.240 --> 00:10:53.590 align:start position:0%
of the R4 register then we're going to
add<00:10:50.519><c> that</c><00:10:50.760><c> to</c><00:10:50.959><c> our</c><00:10:51.240><c> final</c><00:10:51.560><c> r0</c>

00:10:53.590 --> 00:10:53.600 align:start position:0%
add that to our final r0
 

00:10:53.600 --> 00:10:56.150 align:start position:0%
add that to our final r0
register<00:10:54.600><c> and</c><00:10:54.760><c> now</c><00:10:54.920><c> we</c><00:10:55.160><c> have</c><00:10:55.399><c> our</c><00:10:55.680><c> actual</c>

00:10:56.150 --> 00:10:56.160 align:start position:0%
register and now we have our actual
 

00:10:56.160 --> 00:11:00.550 align:start position:0%
register and now we have our actual
total<00:10:56.959><c> so</c><00:10:57.160><c> let's</c><00:10:57.399><c> step</c><00:10:57.720><c> out</c><00:10:57.920><c> of</c><00:10:58.160><c> here</c>

00:11:00.550 --> 00:11:00.560 align:start position:0%
total so let's step out of here
 

00:11:00.560 --> 00:11:02.430 align:start position:0%
total so let's step out of here
now<00:11:00.800><c> this</c><00:11:00.880><c> is</c><00:11:01.040><c> going</c><00:11:01.200><c> to</c><00:11:01.360><c> go</c><00:11:01.480><c> to</c><00:11:01.920><c> after</c><00:11:02.279><c> the</c>

00:11:02.430 --> 00:11:02.440 align:start position:0%
now this is going to go to after the
 

00:11:02.440 --> 00:11:04.430 align:start position:0%
now this is going to go to after the
function<00:11:02.920><c> call</c><00:11:03.399><c> and</c><00:11:03.480><c> now</c><00:11:03.600><c> we</c><00:11:03.720><c> have</c><00:11:03.839><c> our</c><00:11:04.160><c> return</c>

00:11:04.430 --> 00:11:04.440 align:start position:0%
function call and now we have our return
 

00:11:04.440 --> 00:11:05.629 align:start position:0%
function call and now we have our return
value<00:11:04.720><c> that</c><00:11:04.800><c> we're</c><00:11:04.920><c> going</c><00:11:05.040><c> to</c><00:11:05.120><c> be</c><00:11:05.240><c> storing</c>

00:11:05.629 --> 00:11:05.639 align:start position:0%
value that we're going to be storing
 

00:11:05.639 --> 00:11:08.110 align:start position:0%
value that we're going to be storing
inside<00:11:05.880><c> of</c><00:11:06.000><c> the</c><00:11:06.120><c> RT</c><00:11:06.600><c> register</c><00:11:07.560><c> let</c><00:11:07.680><c> me</c><00:11:07.839><c> step</c>

00:11:08.110 --> 00:11:08.120 align:start position:0%
inside of the RT register let me step
 

00:11:08.120 --> 00:11:10.790 align:start position:0%
inside of the RT register let me step
over<00:11:08.760><c> that</c><00:11:09.760><c> and</c><00:11:09.959><c> now</c><00:11:10.160><c> we're</c><00:11:10.399><c> actually</c><00:11:10.639><c> going</c>

00:11:10.790 --> 00:11:10.800 align:start position:0%
over that and now we're actually going
 

00:11:10.800 --> 00:11:13.030 align:start position:0%
over that and now we're actually going
to<00:11:10.959><c> be</c><00:11:11.240><c> resetting</c><00:11:11.800><c> our</c><00:11:12.040><c> stack</c><00:11:12.600><c> so</c><00:11:12.760><c> we're</c><00:11:12.920><c> going</c>

00:11:13.030 --> 00:11:13.040 align:start position:0%
to be resetting our stack so we're going
 

00:11:13.040 --> 00:11:15.430 align:start position:0%
to be resetting our stack so we're going
to<00:11:13.200><c> be</c><00:11:13.519><c> adding</c><00:11:13.920><c> 8</c><00:11:14.279><c> bytes</c><00:11:14.680><c> to</c><00:11:15.000><c> the</c><00:11:15.120><c> stack</c>

00:11:15.430 --> 00:11:15.440 align:start position:0%
to be adding 8 bytes to the stack
 

00:11:15.440 --> 00:11:17.629 align:start position:0%
to be adding 8 bytes to the stack
pointer<00:11:16.120><c> so</c><00:11:16.320><c> we</c><00:11:16.480><c> get</c><00:11:16.720><c> rid</c><00:11:16.880><c> of</c><00:11:17.120><c> those</c><00:11:17.360><c> eight</c>

00:11:17.629 --> 00:11:17.639 align:start position:0%
pointer so we get rid of those eight
 

00:11:17.639 --> 00:11:19.710 align:start position:0%
pointer so we get rid of those eight
bytes<00:11:18.040><c> that</c><00:11:18.160><c> we</c><00:11:18.360><c> subtracted</c><00:11:19.360><c> that</c><00:11:19.519><c> we</c>

00:11:19.710 --> 00:11:19.720 align:start position:0%
bytes that we subtracted that we
 

00:11:19.720 --> 00:11:21.990 align:start position:0%
bytes that we subtracted that we
allocated<00:11:20.360><c> for</c><00:11:20.600><c> two</c><00:11:20.920><c> variables</c><00:11:21.399><c> to</c><00:11:21.519><c> be</c><00:11:21.639><c> stored</c>

00:11:21.990 --> 00:11:22.000 align:start position:0%
allocated for two variables to be stored
 

00:11:22.000 --> 00:11:25.310 align:start position:0%
allocated for two variables to be stored
on<00:11:22.120><c> the</c><00:11:22.320><c> stack</c><00:11:23.240><c> so</c><00:11:23.399><c> we'll</c><00:11:23.600><c> do</c><00:11:24.120><c> step</c><00:11:24.440><c> over</c><00:11:25.160><c> now</c>

00:11:25.310 --> 00:11:25.320 align:start position:0%
on the stack so we'll do step over now
 

00:11:25.320 --> 00:11:28.190 align:start position:0%
on the stack so we'll do step over now
we're<00:11:25.480><c> set</c><00:11:25.680><c> to</c><00:11:26.120><c> -4</c><00:11:27.079><c> so</c><00:11:27.279><c> now</c><00:11:27.519><c> the</c><00:11:27.800><c> final</c>

00:11:28.190 --> 00:11:28.200 align:start position:0%
we're set to -4 so now the final
 

00:11:28.200 --> 00:11:29.910 align:start position:0%
we're set to -4 so now the final
allocation<00:11:28.680><c> on</c><00:11:28.800><c> the</c><00:11:29.120><c> stack</c><00:11:29.360><c> is</c><00:11:29.480><c> going</c><00:11:29.600><c> to</c><00:11:29.720><c> be</c>

00:11:29.910 --> 00:11:29.920 align:start position:0%
allocation on the stack is going to be
 

00:11:29.920 --> 00:11:32.509 align:start position:0%
allocation on the stack is going to be
removed<00:11:30.480><c> when</c><00:11:30.600><c> we</c><00:11:30.720><c> run</c><00:11:30.959><c> this</c><00:11:31.200><c> pop</c><00:11:31.519><c> instruction</c>

00:11:32.509 --> 00:11:32.519 align:start position:0%
removed when we run this pop instruction
 

00:11:32.519 --> 00:11:34.629 align:start position:0%
removed when we run this pop instruction
so<00:11:32.839><c> step</c><00:11:33.120><c> over</c><00:11:33.600><c> now</c><00:11:33.760><c> it's</c><00:11:33.880><c> going</c><00:11:34.000><c> to</c><00:11:34.079><c> be</c><00:11:34.240><c> reset</c>

00:11:34.629 --> 00:11:34.639 align:start position:0%
so step over now it's going to be reset
 

00:11:34.639 --> 00:11:37.430 align:start position:0%
so step over now it's going to be reset
to<00:11:34.839><c> zero</c><00:11:35.800><c> and</c><00:11:35.920><c> if</c><00:11:36.000><c> we</c><00:11:36.160><c> go</c><00:11:36.360><c> back</c><00:11:36.480><c> to</c><00:11:36.639><c> memory</c>

00:11:37.430 --> 00:11:37.440 align:start position:0%
to zero and if we go back to memory
 

00:11:37.440 --> 00:11:39.470 align:start position:0%
to zero and if we go back to memory
you'll<00:11:37.639><c> see</c><00:11:37.880><c> that</c><00:11:38.040><c> we</c><00:11:38.200><c> still</c><00:11:38.560><c> do</c><00:11:38.959><c> have</c><00:11:39.200><c> these</c>

00:11:39.470 --> 00:11:39.480 align:start position:0%
you'll see that we still do have these
 

00:11:39.480 --> 00:11:41.790 align:start position:0%
you'll see that we still do have these
values<00:11:39.839><c> stored</c><00:11:40.240><c> on</c><00:11:40.360><c> the</c><00:11:40.560><c> stack</c><00:11:41.440><c> but</c><00:11:41.639><c> now</c>

00:11:41.790 --> 00:11:41.800 align:start position:0%
values stored on the stack but now
 

00:11:41.800 --> 00:11:43.310 align:start position:0%
values stored on the stack but now
they're<00:11:41.959><c> just</c><00:11:42.120><c> kind</c><00:11:42.240><c> of</c><00:11:42.399><c> throwaway</c><00:11:42.920><c> values</c>

00:11:43.310 --> 00:11:43.320 align:start position:0%
they're just kind of throwaway values
 

00:11:43.320 --> 00:11:44.990 align:start position:0%
they're just kind of throwaway values
since<00:11:43.519><c> the</c><00:11:43.680><c> stack</c><00:11:43.959><c> is</c><00:11:44.160><c> actually</c><00:11:44.399><c> pointing</c>

00:11:44.990 --> 00:11:45.000 align:start position:0%
since the stack is actually pointing
 

00:11:45.000 --> 00:11:47.110 align:start position:0%
since the stack is actually pointing
here<00:11:45.320><c> now</c><00:11:45.720><c> now</c><00:11:45.839><c> if</c><00:11:45.959><c> you</c><00:11:46.160><c> notice</c><00:11:46.600><c> the</c><00:11:46.800><c> last</c>

00:11:47.110 --> 00:11:47.120 align:start position:0%
here now now if you notice the last
 

00:11:47.120 --> 00:11:49.350 align:start position:0%
here now now if you notice the last
thing<00:11:47.760><c> is</c><00:11:47.920><c> that</c><00:11:48.120><c> these</c><00:11:48.440><c> addresses</c><00:11:49.040><c> on</c><00:11:49.160><c> the</c>

00:11:49.350 --> 00:11:49.360 align:start position:0%
thing is that these addresses on the
 

00:11:49.360 --> 00:11:50.990 align:start position:0%
thing is that these addresses on the
left<00:11:49.639><c> hand</c><00:11:49.880><c> side</c><00:11:50.079><c> are</c><00:11:50.200><c> going</c><00:11:50.320><c> to</c><00:11:50.440><c> be</c><00:11:50.639><c> negative</c>

00:11:50.990 --> 00:11:51.000 align:start position:0%
left hand side are going to be negative
 

00:11:51.000 --> 00:11:52.750 align:start position:0%
left hand side are going to be negative
numbers<00:11:51.680><c> since</c><00:11:51.920><c> they're</c><00:11:52.160><c> actually</c><00:11:52.440><c> going</c><00:11:52.600><c> to</c>

00:11:52.750 --> 00:11:52.760 align:start position:0%
numbers since they're actually going to
 

00:11:52.760 --> 00:11:55.069 align:start position:0%
numbers since they're actually going to
be<00:11:53.000><c> ending</c><00:11:53.360><c> in</c><00:11:53.560><c> ones</c><00:11:54.160><c> so</c><00:11:54.399><c> remember</c><00:11:54.839><c> your</c>

00:11:55.069 --> 00:11:55.079 align:start position:0%
be ending in ones so remember your
 

00:11:55.079 --> 00:11:57.949 align:start position:0%
be ending in ones so remember your
signed<00:11:55.480><c> number</c><00:11:55.959><c> conversions</c><00:11:56.959><c> and</c><00:11:57.120><c> then</c><00:11:57.480><c> as</c><00:11:57.720><c> we</c>

00:11:57.949 --> 00:11:57.959 align:start position:0%
signed number conversions and then as we
 

00:11:57.959 --> 00:12:00.110 align:start position:0%
signed number conversions and then as we
go<00:11:58.600><c> down</c><00:11:59.160><c> here</c><00:11:59.480><c> these</c><00:11:59.600><c> are</c><00:11:59.720><c> going</c><00:11:59.839><c> to</c><00:11:59.920><c> be</c>

00:12:00.110 --> 00:12:00.120 align:start position:0%
go down here these are going to be
 

00:12:00.120 --> 00:12:02.310 align:start position:0%
go down here these are going to be
bigger<00:12:00.440><c> and</c><00:12:00.600><c> bigger</c><00:12:01.000><c> values</c><00:12:01.680><c> so</c><00:12:01.920><c> remember</c>

00:12:02.310 --> 00:12:02.320 align:start position:0%
bigger and bigger values so remember
 

00:12:02.320 --> 00:12:04.150 align:start position:0%
bigger and bigger values so remember
that<00:12:02.480><c> the</c><00:12:02.680><c> stack</c><00:12:03.040><c> is</c><00:12:03.240><c> actually</c><00:12:03.560><c> growing</c>

00:12:04.150 --> 00:12:04.160 align:start position:0%
that the stack is actually growing
 

00:12:04.160 --> 00:12:06.350 align:start position:0%
that the stack is actually growing
downward<00:12:05.040><c> while</c><00:12:05.240><c> we're</c><00:12:05.440><c> allocating</c><00:12:06.079><c> these</c>

00:12:06.350 --> 00:12:06.360 align:start position:0%
downward while we're allocating these
 

00:12:06.360 --> 00:12:08.269 align:start position:0%
downward while we're allocating these
values<00:12:07.120><c> thanks</c><00:12:07.320><c> so</c><00:12:07.440><c> much</c><00:12:07.560><c> for</c><00:12:07.720><c> watching</c><00:12:07.920><c> Lori</c>

00:12:08.269 --> 00:12:08.279 align:start position:0%
values thanks so much for watching Lori
 

00:12:08.279 --> 00:12:10.269 align:start position:0%
values thanks so much for watching Lori
wired<00:12:08.639><c> everyone</c><00:12:09.160><c> in</c><00:12:09.320><c> this</c><00:12:09.480><c> video</c><00:12:09.800><c> we</c><00:12:09.880><c> saw</c><00:12:10.120><c> how</c>

00:12:10.269 --> 00:12:10.279 align:start position:0%
wired everyone in this video we saw how
 

00:12:10.279 --> 00:12:12.350 align:start position:0%
wired everyone in this video we saw how
we<00:12:10.399><c> could</c><00:12:10.560><c> use</c><00:12:10.839><c> the</c><00:12:11.079><c> stack</c><00:12:11.440><c> to</c><00:12:11.760><c> allocate</c>

00:12:12.350 --> 00:12:12.360 align:start position:0%
we could use the stack to allocate
 

00:12:12.360 --> 00:12:15.230 align:start position:0%
we could use the stack to allocate
additional<00:12:12.959><c> arguments</c><00:12:13.480><c> to</c><00:12:13.720><c> call</c><00:12:14.040><c> a</c><00:12:14.240><c> function</c>

00:12:15.230 --> 00:12:15.240 align:start position:0%
additional arguments to call a function
 

00:12:15.240 --> 00:12:17.310 align:start position:0%
additional arguments to call a function
remember<00:12:15.600><c> we</c><00:12:15.760><c> have</c><00:12:15.880><c> to</c><00:12:16.040><c> use</c><00:12:16.320><c> the</c><00:12:16.480><c> r0</c><00:12:17.079><c> through</c>

00:12:17.310 --> 00:12:17.320 align:start position:0%
remember we have to use the r0 through
 

00:12:17.320 --> 00:12:20.069 align:start position:0%
remember we have to use the r0 through
R3<00:12:18.040><c> registers</c><00:12:18.639><c> to</c><00:12:18.800><c> store</c><00:12:19.120><c> the</c><00:12:19.320><c> first</c><00:12:19.600><c> four</c>

00:12:20.069 --> 00:12:20.079 align:start position:0%
R3 registers to store the first four
 

00:12:20.079 --> 00:12:22.189 align:start position:0%
R3 registers to store the first four
arguments<00:12:20.959><c> but</c><00:12:21.120><c> then</c><00:12:21.360><c> any</c><00:12:21.639><c> subsequent</c>

00:12:22.189 --> 00:12:22.199 align:start position:0%
arguments but then any subsequent
 

00:12:22.199 --> 00:12:24.269 align:start position:0%
arguments but then any subsequent
arguments<00:12:22.639><c> will</c><00:12:22.959><c> actually</c><00:12:23.240><c> need</c><00:12:23.440><c> to</c><00:12:23.760><c> allocate</c>

00:12:24.269 --> 00:12:24.279 align:start position:0%
arguments will actually need to allocate
 

00:12:24.279 --> 00:12:26.310 align:start position:0%
arguments will actually need to allocate
additional<00:12:24.880><c> space</c><00:12:25.360><c> on</c><00:12:25.560><c> the</c><00:12:25.760><c> stack</c><00:12:26.120><c> and</c><00:12:26.199><c> then</c>

00:12:26.310 --> 00:12:26.320 align:start position:0%
additional space on the stack and then
 

00:12:26.320 --> 00:12:28.590 align:start position:0%
additional space on the stack and then
we<00:12:26.480><c> have</c><00:12:26.560><c> to</c><00:12:26.839><c> reset</c><00:12:27.399><c> the</c><00:12:27.560><c> stack</c><00:12:27.880><c> pointer</c><00:12:28.399><c> once</c>

00:12:28.590 --> 00:12:28.600 align:start position:0%
we have to reset the stack pointer once
 

00:12:28.600 --> 00:12:30.870 align:start position:0%
we have to reset the stack pointer once
we're<00:12:28.920><c> finished</c><00:12:29.279><c> calling</c><00:12:29.720><c> those</c><00:12:29.959><c> functions</c>

00:12:30.870 --> 00:12:30.880 align:start position:0%
we're finished calling those functions
 

00:12:30.880 --> 00:12:32.470 align:start position:0%
we're finished calling those functions
we<00:12:31.000><c> also</c><00:12:31.199><c> learned</c><00:12:31.480><c> that</c><00:12:31.639><c> the</c><00:12:31.760><c> stack</c><00:12:32.079><c> grows</c>

00:12:32.470 --> 00:12:32.480 align:start position:0%
we also learned that the stack grows
 

00:12:32.480 --> 00:12:34.750 align:start position:0%
we also learned that the stack grows
downwards<00:12:33.199><c> and</c><00:12:33.440><c> that</c><00:12:33.600><c> the</c><00:12:33.839><c> push</c><00:12:34.160><c> and</c><00:12:34.440><c> Pop</c>

00:12:34.750 --> 00:12:34.760 align:start position:0%
downwards and that the push and Pop
 

00:12:34.760 --> 00:12:37.150 align:start position:0%
downwards and that the push and Pop
instructions<00:12:35.519><c> actually</c><00:12:36.160><c> automatically</c>

00:12:37.150 --> 00:12:37.160 align:start position:0%
instructions actually automatically
 

00:12:37.160 --> 00:12:39.110 align:start position:0%
instructions actually automatically
change<00:12:37.600><c> the</c><00:12:37.800><c> stack</c><00:12:38.160><c> pointer</c><00:12:38.600><c> depending</c><00:12:38.920><c> on</c>

00:12:39.110 --> 00:12:39.120 align:start position:0%
change the stack pointer depending on
 

00:12:39.120 --> 00:12:41.110 align:start position:0%
change the stack pointer depending on
what<00:12:39.360><c> operation</c><00:12:39.880><c> they're</c><00:12:40.079><c> doing</c><00:12:40.760><c> so</c><00:12:40.920><c> thanks</c>

00:12:41.110 --> 00:12:41.120 align:start position:0%
what operation they're doing so thanks
 

00:12:41.120 --> 00:12:42.790 align:start position:0%
what operation they're doing so thanks
so<00:12:41.279><c> much</c><00:12:41.399><c> for</c><00:12:41.560><c> watching</c><00:12:41.880><c> Lor</c><00:12:42.199><c> wir</c><00:12:42.519><c> everyone</c>

00:12:42.790 --> 00:12:42.800 align:start position:0%
so much for watching Lor wir everyone
 

00:12:42.800 --> 00:12:49.370 align:start position:0%
so much for watching Lor wir everyone
and<00:12:42.920><c> I'll</c><00:12:43.120><c> catch</c><00:12:43.279><c> you</c><00:12:43.360><c> in</c><00:12:43.440><c> the</c><00:12:43.600><c> next</c>

00:12:49.370 --> 00:12:49.380 align:start position:0%
 
 

00:12:49.380 --> 00:12:53.350 align:start position:0%
 
[Music]

00:12:53.350 --> 00:12:53.360 align:start position:0%
[Music]
 

00:12:53.360 --> 00:12:56.790 align:start position:0%
[Music]
video

00:12:56.790 --> 00:12:56.800 align:start position:0%
 
 

00:12:56.800 --> 00:13:00.670 align:start position:0%
 
shoot<00:12:57.800><c> oh</c><00:12:58.120><c> no</c>

00:13:00.670 --> 00:13:00.680 align:start position:0%
shoot oh no
 

00:13:00.680 --> 00:13:04.279 align:start position:0%
shoot oh no
yeah<00:13:00.800><c> I</c><00:13:00.920><c> messed</c><00:13:01.199><c> that</c><00:13:01.320><c> one</c><00:13:01.519><c> up</c>

