Now we're going to do an example, so
we're going to define a string and
then we're going to print off that
string and then we'll modify it and
we'll print off the modified string.
So I got my editor here.
I've already created my project,
which we also know how to do,
so let's define our string.
So I define my characters,
put an end
of string here until Terminator,
no, go ahead and print it off so we
should know how to do this movie.
Hello.
Call print string
and we'll call brand
new line.
OK, so now what I want to do is
I want to modify it.
So I'm going to change the W from a
lowercase W to an uppercase W
so I can move my address into
X.
And then if we calculate, we can
see that the word hello has five
letters and then there's a space.
So six, so we're going
to add to yak's
the number six.
There we go,
and then we'll go ahead and move a
bite into that location, so
I only want to write one bite
if I can spell.
The value added tax,
and I'm going to change that to an
uppercase W and so I put
a lowercase W and now I've modified
that.
So then I again can move into
X, the value of Halo
call, print
string and the new line.
So I go ahead and modify that and
then I'll go ahead and print off my
string again, so
we'll go ahead and build it.
So we can see that we printed off
the original and then we modified it
by figuring out our offsets and go
ahead and changing that.
So today, we talked about indirect
addressing, we created
some variables, we modified some
variables, and then we modified
a string using offsets.
So here's a quiz
given the following, so we have a
segment in our segment, data
we have hello.
And this is a test,
so you should think about how do you
get the address of the variable?
Hello.
And how do you get the data at the
location? Hello?
In paused the lecture.
So to get the address of the
variable, hello, right, you don't
use the brackets and to get the data
at that location, you do use the
brackets.
So looking forward, we're going to
talk about the stack
and then if you have questions, you
can contact me at Miller, MJ at
Unclutter Edu and you can
find me on Twitter at Milhouse 30.