Hello. This is Dr Miller, and this is episode 1.1 of assembly.
So who should take this course? You should take this course if you're interested in the low level programming, if you want to know how compilers work and d compilers work,
if you're interested in reverse engineering malicious software or if you want to edit some binary softer that is no longer available where the source is gone.
So the requirements for this course, our access to an Lennox computer and the ability to install Lennox in a virtual machine one of these two would suffice and then having the ability to use an editor such a Zvi I PICO or Nano is a plus, but not a requirement.
So in this video, we're gonna 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 cybersecurity.
I'm a programmer and a hacker in both life and in computers, and I have a PhD in computer science from Kansas State University.
So let's install the software.
So this, after a prerequisites, are you have to install a version of a bun too. So, for example, a bun to 16. 04
And then we need these additional libraries to be installed.
So in order to install them, you can use the pseudo command so you can say Sudo apt install Nazem GCC multi lib and V. I am
so here. I have my a bun, too
Virtual machine, and I'll go ahead and open up the terminal and I'll go ahead and install those libraries that 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 guy. You don't tell you all the steps that we're going to show here.
So I'm gonna go ahead and open up the terminal
and we can install the proof pre required libraries.
It will ask me for my password
if I can type it right.
And then I already insult 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 gonna go ahead and download these scripts. The template called the template make.
We will extract the software, will go ahead and install it, and then we have to log out and create a project.
Okay, so I've downloaded it. No extract it.
If I look, I can see I have. So ls will show the files in a directory
So we can see here that I have downloaded this Targhee zip file.
And then when I extracted it made a directory, and that's the blue.
So go ahead and install the software.
Okay? And it says I'm supposed to log out. So I just closed my terminal,
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 l s will show us our files and folders.
You want a full listing? Ls minus. H a l.
So I 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
So V. I 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, weaken type escape
when we want to writing Quit. If we're not in escape mode, insert mode within type colon w Q. And if we are an insert mode and we want to escape and quit, we type escape colon W Q.
So here again is how we create a program So we'll go ahead and use the Gen make
to create a A project called Hello will enter the Project Directory will show the files inside of it.
Go ahead and added, our file using V I. And I'll tell you, as we're going
well, type in are a couple of strings in places that where they need to go and then we'll go ahead and build it.
And again, this is all in the guide.
so let's go ahead and create our project.
So if we look inside the projects we see we have a Hello ls Lagan shows us off our files.
Ls minus h. L will show them in Huebel human form, and I'll show all the files. So go ahead and enter my hello directory.
So the father we're going to edit is hollowed a SM soda editor with V i v I
We go ahead and look in here and it says that at the top were in the data section.
We're gonna put the code.
I typed I for insert high
your type. Whatever you want in here. World
But I didn't use my arrow key to move down in this part. I'm gonna write movie a ex high
Now I'm in insert mode, so I want to
exit, insert mode and write in quick escape Colon W Q
All right now to build my project, I type make.
You wouldn't see that it went ahead and ran the Nazem 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 in salt 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
And then we assembled and compiled the code using the make command. And then we ran our program.
So, looking forward, we're gonna learn about assembly programming. We're gonna learn about binary and two's complement and Hexi Decimal.
If you have questions, you can contact me at Miller MJ at you and Keita et you. And you can find me on Twitter at Milhouse 30.