Indirect Addressing and Variables Part 2
Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Transcription
00:00
Now we're going to do an example. So we're going to define a string, and then we're gonna print off that string, and then we'll modify it and we'll print off the modified string.
00:10
So I got my editor here. I've already created my project, which we also know how to do.
00:16
So let's define our string.
00:26
Okay, So I define my characters, put on end
00:30
of string here until Terminator
00:34
No, go ahead and friended off. So we should know how to do this movie a X. Hello?
00:41
Call print string.
00:45
It will call Brent
00:48
New line.
00:50
Okay, so now what I want to do is I want to modify it. So I'm going to change the w from a lower case w to an uppercase w So again, move my address into the A X.
01:02
And then if we calculate, we can see that the word hello has five letters and then there's a space so six
01:08
So we're going to add ta x, The number six.
01:15
There we go
01:19
and then we'll go ahead and move a bite into that location. So
01:23
I only want to write one bite
01:26
wagons fell
01:30
the value at e X
01:34
and I'm gonna change that to an uppercase W. And so I put a lower case W. And now I've modified that
01:41
So the Nike again can move into ea X the value of hello,
01:46
call print
01:48
String and the new line.
01:56
So I go ahead and modify that, and then I'll go ahead and print off my string again.
02:00
So we'll go ahead and build it
02:06
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.
02:16
So today we talked about in director address ing.
02:20
We created some variables. We modified some variables, and then we modified a string using offsets.
02:28
So here's a quiz
02:30
given the following. So we have a segment in our segment, data we have Hello. And then this is a test.
02:37
So you should think about how do you get the address of the variable? Hello?
02:40
And how do you get the data at the location? Hello.
02:46
You can pause a lecture.
02:50
So to get the address of the variable holo where you don't use the brackets and to get the data at that location, you do use the brackets.
03:00
So, looking forward, we're gonna talk about the stack,
03:04
and then if you have questions, you can contact me at Miller MJ at you and Kate. I e d u. And you can find me on Twitter at Milhouse 30.
Up Next
Similar Content