WEBVTT

00:00.180 --> 00:01.889
Now we're going to do an example, so

00:01.890 --> 00:03.389
we're going to define a string and

00:03.390 --> 00:04.469
then we're going to print off that

00:04.470 --> 00:06.209
string and then we'll modify it and

00:06.210 --> 00:07.829
we'll print off the modified string.

00:10.940 --> 00:12.259
So I got my editor here.

00:12.410 --> 00:13.999
I've already created my project,

00:14.090 --> 00:15.470
which we also know how to do,

00:16.250 --> 00:17.450
so let's define our string.

00:26.680 --> 00:27.954
So I define my characters,

00:28.540 --> 00:29.859
put an end

00:31.000 --> 00:32.859
of string here until Terminator,

00:34.030 --> 00:35.559
no, go ahead and print it off so we

00:35.560 --> 00:37.150
should know how to do this movie.

00:37.720 --> 00:38.720
Hello.

00:41.610 --> 00:43.950
Call print string

00:45.120 --> 00:47.700
and we'll call brand

00:48.360 --> 00:49.360
new line.

00:50.430 --> 00:52.319
OK, so now what I want to do is

00:52.320 --> 00:53.340
I want to modify it.

00:54.000 --> 00:55.829
So I'm going to change the W from a

00:55.830 --> 00:58.009
lowercase W to an uppercase W

00:58.050 --> 00:59.850
so I can move my address into

01:00.060 --> 01:01.060
X.

01:02.920 --> 01:04.488
And then if we calculate, we can

01:04.840 --> 01:06.459
see that the word hello has five

01:06.460 --> 01:07.879
letters and then there's a space.

01:07.900 --> 01:09.849
So six, so we're going

01:09.850 --> 01:11.920
to add to yak's

01:12.220 --> 01:13.220
the number six.

01:16.770 --> 01:17.770
There we go,

01:19.470 --> 01:21.136
and then we'll go ahead and move a

01:21.480 --> 01:23.730
bite into that location, so

01:24.300 --> 01:26.129
I only want to write one bite

01:27.570 --> 01:28.570
if I can spell.

01:30.930 --> 01:32.550
The value added tax,

01:34.800 --> 01:36.359
and I'm going to change that to an

01:36.360 --> 01:37.536
uppercase W and so I put

01:38.310 --> 01:40.025
a lowercase W and now I've modified

01:40.290 --> 01:41.290
that.

01:41.610 --> 01:43.439
So then I again can move into

01:43.440 --> 01:45.150
X, the value of Halo

01:46.260 --> 01:47.489
call, print

01:48.390 --> 01:50.370
string and the new line.

01:56.130 --> 01:57.747
So I go ahead and modify that and

01:57.930 --> 01:59.159
then I'll go ahead and print off my

01:59.160 --> 02:00.749
string again, so

02:01.110 --> 02:02.129
we'll go ahead and build it.

02:06.650 --> 02:08.029
So we can see that we printed off

02:08.030 --> 02:09.794
the original and then we modified it

02:09.979 --> 02:11.645
by figuring out our offsets and go

02:11.750 --> 02:12.830
ahead and changing that.

02:17.430 --> 02:19.019
So today, we talked about indirect

02:19.020 --> 02:20.879
addressing, we created

02:20.880 --> 02:22.448
some variables, we modified some

02:22.530 --> 02:24.659
variables, and then we modified

02:24.660 --> 02:26.399
a string using offsets.

02:28.340 --> 02:29.360
So here's a quiz

02:30.350 --> 02:31.819
given the following, so we have a

02:31.820 --> 02:33.979
segment in our segment, data

02:34.250 --> 02:35.059
we have hello.

02:35.060 --> 02:36.319
And this is a test,

02:37.070 --> 02:38.449
so you should think about how do you

02:38.450 --> 02:40.099
get the address of the variable?

02:40.110 --> 02:41.110
Hello.

02:41.450 --> 02:43.116
And how do you get the data at the

02:43.460 --> 02:44.460
location? Hello?

02:46.620 --> 02:47.760
In paused the lecture.

02:50.580 --> 02:51.952
So to get the address of the

02:51.960 --> 02:53.399
variable, hello, right, you don't

02:53.400 --> 02:55.019
use the brackets and to get the data

02:55.020 --> 02:56.399
at that location, you do use the

02:56.400 --> 02:57.400
brackets.

03:00.150 --> 03:01.259
So looking forward, we're going to

03:01.260 --> 03:02.399
talk about the stack

03:04.020 --> 03:05.489
and then if you have questions, you

03:05.490 --> 03:07.139
can contact me at Miller, MJ at

03:07.140 --> 03:08.365
Unclutter Edu and you can

03:09.060 --> 03:10.800
find me on Twitter at Milhouse 30.

