How to use the function of assembly.

Posted NONE

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了How to use the function of assembly.相关的知识,希望对你有一定的参考价值。

Here are some simple conceptions that I summarized:

              1, %rsp    -----  top of the stack

    2, %rbp    -----  base address

              3, The stack of function is upside down

                   So when we push a value, %rsp sub

      4, We push parameters before we call a function. So the values of parameters are above the %rbp(base address).

                                                                And the values of local variables are under the %rbp.

              5, We must save the former base address before calling a new function.Because maybe we are calling a function from another function. the Nested Functions.

         6, after saving the value of former base address, the new base address should be pointed to the %rsp(top of the stack).

 

 

以上是关于How to use the function of assembly.的主要内容,如果未能解决你的问题,请参考以下文章

How to fix use the cURL to connect to GitHub with a 443 HTTPS error All In One

How To Use the AWK language to Manipulate Text in Linux

How to use the audio gadget driver

How to use the attributes :layout_weight

The Beginner’s Guide on How to Use TaoBao

How to Stop Procrastinating by Using the “2-Minute Rule”