linux-アセンブリ-アドレスおよびアドレス変数(6)

722 ワード

.section .data
   mynum:
   .int 8
   mygs:
   .asciz "%x----%x----%x
" .section .text .globl main main: leal mynum,%eax # mynum %eax movl (%eax),%ebx# %eax %ebx movl mynum,%ecx# mynum %ecx push %ecx push %ebx push %eax push $mygs call printf push $0 call exit
 deepfuture@deepfuture-laptop:~/private/mytest$ gcc -o test66 test66.s
deepfuture@deepfuture-laptop:~/private/mytest$ ./test66
804a018----8----8
deepfuture@deepfuture-laptop:~/private/mytest$