Hello, this is Dr. Miller, and this
is Episode eleven point two of
Assembly today.
What we're going to do is we're
going to download and install the
template.
So the template,
this template is specific to
arm. So it's similar to the
template. And so what we're going to
do is we're going to download,
install it, and then it'll create
projects for us that we can use
for our coding purposes.
So I've got our Raspberry Pi here
that I can access into,
and so I've cleaned
it up.
So the first thing that we're going
to do is go back
here.
As we were going to download the
template, so that's we're going to
use the W get commands, we get
space HGP, I
suggest that you Ankita to use
till Damilola armed template,
Dr. Jizzy.
And you got to make sure you get all
the letters, the correct
capitalization, then we'll extract
it. We will run the fix on
it, and then you'll need to log out
and log back in.
Now I've already run it so I won't
have to log out, but you will have
to log out or open
a new terminal in order for it to
work.
All right.
So let's go ahead and download it.
OK, so it should say that it had
saved our file,
and if we do, unless we should see
the arm template here.
So now I should see a folder called
template, if I do not
slash templates, I should fix
that should fix my environment.
So now is a point where you would
log out and log back in
and then you create a new project.
We can use Arm Jen
and then the name of our
project that we want to create.
So I'm going to create one called
Fred.
And here it's says successfully
clear, added Fred, if you try and do
it again,
it says that that directory already
exists so we can't recreate it
if we're doing that less.
And look at our files.
We see that now.
It's started. We had our template.
The guy when we extracted that,
we ended up with a folder called
Template, and now we have an
additional folder called Project.
All right, so if we're going to
project again, this is where our
projects will be so we can go into
Fred.
We can see that we have our library,
we have our makefile, and then we
have our assembly file, so we'll go
ahead and edit Fred and Sam.
So let's add some
messaging. So this is similar to
the example given in the first
armed lecture.
So here we're just going to add a
string here.
We're going to tell it to align on
four by boundaries.
And then ARM has some different
directives so we can see
an ASCII string that ends in a zero
is a C I, Z,
and then we can just type A string
hello world with an exclamation
point and we
can even put a slash in here.
We want a new line.
And then if we want to go ahead
and print off that,
we can
learn about these commands later.
FDR are zero
message
branch of link print.
Strings that'll print a string
off.
We can also do things like move.
Are zero the number?
Let's pick a number 19.
You can do brands with link print,
and so that'll print
off that no actual number
19.
And then when we're all done down
here, so here is our
you can see comments are either
asterisked and then at the end,
Astroglide, that's multiline or
single line.
And then a regular comment is
slash and then everything after
that. And you can see syntax
highlighting here shows that for me
that I can see that.
Go ahead and write and quit,
and then we can type, make and
so make, we'll go ahead and run
the assembler on
our assembly file.
So Fred HSM,
it'll also run it on our library
and then we can use disk to compile
it into a binary code, Fred.
Additionally, we need to make sure
that we save our link register.
So go ahead and say push
ALAH
when we're done.
We need to restore that because that
saves where we needed to go at the
end. So pop
l.r.
And then additionally, we've got to
create our tech segment, which
wasn't by default set up there.
So text.
For our main program.
So now
if we don't make.
We can see that it should be built
and now when we run that we can see
that it prints off Hello World and
then the number 19.
So today, we looked at
installing the template for ARM and
then using it in a similar way
that we use our exact template.
So looking forward, we're going to
talk about some of the instructions
that we saw. So, for example, moving
data to and from memory.
So we were able to load our string
and load the number
19 from variables.
And so we'll look at how we
do that in arm, which is going
to differ a little bit than what we
did in 86.
So if you have questions, you can
email me at millirems at Unclutter
Edu, and you can find me on Twitter
at Morehouse 30.