size of executable files?

后端 未结 1 1923
夕颜
夕颜 2020-12-21 07:49

I created a very small code to add two integers and save the result in another variables, both in assembly language and c language. code in assembly cost me 617 bytes but co

相关标签:
1条回答
  • 2020-12-21 08:30

    High level languages have a certain amount of overhead. While in assembly all you have is exactly what you say.

    The overhead you are seeing in this case is likely the static binding of standard components, such as printf. Likely an include statement added these.

    If you want to see what your output is like you will need a dissembler. Here is the documentation for the NASM dissembler if you wanted to take a look at one.

    You can avoid some of this overhead by not including anything and instead implement the functionality in a fashion similar to how you did in assembly.

    0 讨论(0)
提交回复
热议问题