Assembly Language - MOV Instruction

Assembly Language - MOV Instruction


                 So as i said in the previous post that from this post onward I am going to explain all the important instruction that we need to learn and understand a assembly language program....

Mov Instruction :-

  • As its name suggest this instruction is used to MOVE the data from one memory location to another
  • Memory location might be an actual memory location or can be a register.
  • MOV instruction follows all the combination of moving data we saw in the addressing modes. That's why I said that addressing modes are important. Now you are slowly getting like how it is all connected to each other.
  • The MOV instruction copies the data from source to destination. Then why did they name this instruction mov ..... XD why not name it copy or cop .... XD
  • so its not like if i do mov eax,ebx then value inside ebx will move into eax. NO it will copy from ebx to eax that means ebx still have the same value inside it...

Syntax :-

Assembly Language, Reverse Engineering, Binary Exploitation


An Example of Program on MOV Instruction as follows :-

--------------------------------------------------------------------------------------------------------------------------
                                global _start

                               section .text

                               _start:
                                         mov ebx,0x5
                                         mov eax,ebx
                                         mov ecx,eax
                                         mov edx,ecx

--------------------------------------------------------------------------------------------------------------------------

  • Now can you comment me that what are the values for EAX, EBX, ECX, EDX at the end of program.
  • I know you guys can tell.... but what if program is big and little complicated then what....
  • That's why we need some kind of tool to analyze this program and that tool name is GDB or GNU Debugger
             
            I am going to start a separate series on how to use GDB in easy way.... this will completely isolate from Assembly Language... its like I am going to post about GDB as well as Assembly Language. I will going to publish name post as blog update in that i m going to give you overview about the future posts.

[if any of you didn't understand anything then feel free to message me on twitter you can find my twitter id in top right corner just click on the twitter icon].... :)
Assembly Language - MOV Instruction Assembly Language - MOV Instruction Reviewed by h4kk4 on April 27, 2020 Rating: 5

No comments:

Enter your comments here if you need any help:

Powered by Blogger.