Assembly

Course
Time
13 hours 15 minutes
Difficulty
Beginner
CEU/CPE
14

Video Transcription

00:00
This is Dr Miller, and this is the Model one review for Assembly.
00:06
So I'll ask questions. And then you can pause a lecture and try and answer the question
00:12
and then resume the lecture and see what the answer is.
00:16
So the first question, What is a demonic and what is an operator and
00:22
so pneumonic is an instruction to be executed and in operandi is a parameter to the instruction.
00:27
So, for example, in the instruction movie a X 10 h,
00:32
the pneumonic is move
00:34
and the operations are E X and 10.
00:37
There's the parameters of what's going to get changed.
00:42
What are the smaller versions of the EBX register?
00:47
They are be X, which is the lower half of EBX
00:50
B l and B H B L is the lower half of B X
00:55
and B H is the upper half of B X.
01:00
What are the names of the 32 bit registers we have talked about in class? There are quite a few
01:07
e x e b x s e x e x Yes, I e d i e v p e i, p and E S p.
01:14
We've talked about some of them extensively. We will talk about some or in future lectures.
01:22
What register is used for the loop Pneumonic
01:26
E C X
01:27
e C X is documented and then compared with zero.
01:34
So how would you do the following
01:36
shift data to the right.
01:40
For example, s H R is the shift pneumonic and then we're moving a X and then the number two
01:47
arithmetic shift to the left
01:52
s A l shift arithmetic left in this example EBX and then number three So three bits to the left
02:00
multiply.
02:04
We can move numbers into yea x and ebx and then we say mall ebx and slalom multiplied the value any X times the value in E b X
02:14
and then store the result in e, d. X and e X
02:19
copy data from a register to memory.
02:24
So here we have the memory location called data. It is a d word. It has a value of zero
02:31
and lower down in the code. We move into yea X the number 10 and then using the brackets that says we're going to copy into the memory location at data
02:44
comparison looping. So how would you check for equality and then selectively do a command. So, for example,
02:50
if he, A and E x and EBX are equal, there will move seven into EBX.
02:58
So here we do a comparison compared yea x and ebx, if they're not equal, will jump over it. If they are equal, then we'll do the command. Move E B x seven
03:10
Alright, right in lieu pick that goes db X number of times
03:15
and we'll end up calculating the power of to to the ebx
03:19
and then store the result in e X.
03:23
So here I move on arbitrary value into EBX. So that's the e B X number of times
03:29
we'll start off with the number one and then yes, I has the number two
03:32
and then we'll keep multiplying
03:36
yaks and es I so two times one that gives you two, which is stored in the X and in times two is four
03:44
and then we have to copy into Easy X because that's how we can use loop. We have to call it p the value ebx into that register,
03:51
and then the loop command will work. And so it'll go over and over and over again.
03:58
All right, so here is a shift.
04:00
So if we move into yea X, the number 12345678 in Hex. And we do a rotate right e x four.
04:11
So rotate takes the bits off of one end and put some on the other so we can see that we would have the eight would move from over here to over here because thes Aaron hex, which are four bits and we were rotated it by four bits.
04:28
All right, shift left. Yea x four again we have in the X 12345678
04:34
in hex.
04:40
So in this case, the one disappeared because that was four bits. And then we fill in the end with zeros or the number zero in hex.
04:50
All right, so
04:51
this was a quiz and a review to try and help you make sure that you are understanding the content. If you didn't, I'd go back and review the lectures that we've given before. If you still have questions again, you can contact me at Miller MJ at you and Kate I e to you. And you can find me on Twitter at Milhouse 30

Up Next

Assembly

This course will provide background and information related to programming in assembly. Assembly is the lowest level programming language which is useful in reverse engineering and malware analysis.

Instructed By

Instructor Profile Image
Matthew Miller
Assistant Professor at the University of Nebraska at Kearney
Instructor