我想fputs(str, stdout);
从大会打电话。
为什么我应该push dword [stdout]
而不是 just push stdout
?
既然在 C 中我们不这样做fputs(str, *stdout)
,为什么我们需要stdout
在汇编中取消引用?
完整代码:
extern fputs
extern stdout
section .data
hw: db "Hello World!", 10, 0
section .text
global main
main:
enter 0,0
push dword [stdout]
;push stdout
push hw
call fputs
leave
mov eax, 0
ret