Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

a question about how to work with c functions in asm

$
0
0
Hi Guys...!
Look the following source...! please!

.section .data
          data1:
          .int 200000
          data2:
          .int 201010
          result:
          .quad 0
          output:
          .asciz "The result is %qd\n"
.section .text
.globl main
main:
          nop
          movl data, %eax
          mull data2
          movl %eax, result
          movl %edx, result+4
          pushl %edx
          pushl %eax
          call printf
          add $12, %esp
          pushl $0
          call exit
          


Guys i dont know why using add $12, %esp in this snippet code!
Who can tell me what does it instruction in this code?!

sorry for bad english speaking!

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>