Hello, this is Dr. Miller, and this
is Episode one point, one of
assembly.
So who should take this course, you
should take this course if you're
interested in low level programing,
if you want to know how compilers
work and compilers work,
if you're interested in reverse
engineering malicious software,
or if you want to edit some binary
software that is no longer available
where the source is gone.
So the requirements for this course
are access to a Linux computer
and the ability to install Linux and
a virtual machine, one of these
two would suffice.
And then having the ability to use
an editor such as VI, Pekoe
or Nano is a plus, but not
a requirement.
So in this video, we're going to
learn how to download, install and
then run the assembler and the
compiler scripts and then
we'll edit a sample file.
So who am I?
I'm a professor of computer science
and cyber security, I'm
a programmer and a hacker in both
life and in computers.
And I have a Ph.D.
in computer science from Kansas
State University.
So let's install the software,
so the software prerequisites are
you have to install
a version of a bunta, so for
example, one, two, six, four,
and then we need these additional
libraries to be installed.
So in order to install them, you can
use the SUDO command so you can say
Sudo Apte, install Nazeem
JK, Multi Lib and Vem.
So here I have my Ubuntu
virtual machine, and I'll go ahead
and open up the terminal and I'll go
ahead and install those libraries
we wanted to install.
And all of these are in our lab
guide. So if you need
help on them, you can go ahead and
look up that lab guide and I'll tell
you all the steps that we're going
to show here.
So I'm going to go ahead and open up
the terminal.
And we can install the required
library's.
It'll ask me for my password.
If I can type it right.
And then I already installed these,
so you see that it didn't actually
install any of them, but if
you didn't have them, it would ask
you, do you want to install these?
And then you hit? Yes.
So now we have the required
libraries for this course.
Now we have compiler scripts that
make building these projects easy,
and so the process is we're going to
go ahead and download these scripts,
the template called the template
make.
We will extract the software.
We'll go ahead and install it, and
then we have to log out and create
a project.
OK, so I've downloaded it, now
extract it.
If I look, I can see I have
so else will show the files in a
directory so we can see here that
I have downloaded this Taj's
file and then when I extracted
it, it made a directory and that's
the blue.
So I go ahead and install the
software.
OK. And it says, I'm supposed to log
out, so just close my terminal
and open up a new one.
And then I can create a project.
Now, what that did is it created a
folder under our projects folder so
we can see that we have
a folder called Projects
here. So this will show us our files
and folders.
You want a full listing?
Ls minus Akl,
so go ahead and go into the projects
folder.
And as I can see, I have a project
here called my project.
Go ahead and enter that directory
and if I look inside of there I'll
see a bunch of different files that
we can go ahead and use for
our class.
So VI is a program that
allows you to edit files
when you open it, you start in non
insert mode and you can type I to
enter insert mode.
When we want to leave insert mode,
we can type escape when
we want to write and quit.
If we're not in escape mode, insert
mode, we can type colon
WQ and if we are an
insert mode and we want to escape
and quit, we type escape colon
WQ.
So here again is how we create a
program, so we'll go ahead and use
the Djenne make to
create a a project called Hello
will enter the project directory.
We'll show the files inside of it.
Go ahead and edit our file using
VI. And I'll tell you as we're
going, we'll type in after
a couple of strings in places where
they need to go and then we'll go
ahead and build it.
And again, this is All in the Guide.
All right, so let's go
ahead and create our project.
So if we look inside the projects,
we see we have a hello also again,
shows us of our files.
Plus minus hail.
We'll show them in hirable human
form and also all the files.
So go ahead and enter my hello
directory.
So the file that we're going to edit
is hello to ask them to sort of
edit it with Viriato TVI,
hello, ask them
we go ahead and look in here
and it says that at the top we're in
the data section, we're going to put
the code.
I typed I for insert high
DB
Hello, you
can type whatever you want in here,
world
10 zero,
go ahead and use my arrow key to
move down in this part.
I'm going to right move
yak's high
call print
string.
Now I'm in insert mode, so I want
to exit insert
mode and write in quick escape
colon WQ.
All right. Now to build my project
I type make
and we can see that it went ahead
and ran the Nazeem commands in the
GCC command.
And so now I can run my program
by saying dot slash and then the
name of my program which is Hello.
In a printed off hello world.
So in summary, we downloaded
and sold our template, we learned
how to create a project,
edit that assembly code and
it's OK if you don't understand what
you did, you just needed to be able
to have the ability to to
edit it.
And then we assembled and compiled
the code using the make command and
then we ran our program.
So looking forward, we're going to
learn about assembly programing.
We're going to learn about binary
and twos, complement and
hexadecimal.
If you have questions, you can
contact me at Miller, MJ, you and
Kaita Edu, and you can find me on
Twitter at Milhouse 30.