section .data
message: db "Hello, World!", 0Dh, 0Ah, 00h
section .text
extern _printf
global _main
_main:
push message
call _printf
add esp, 4
; myprint(0);에 해당
mov eax, 0
push eax
call _myprint ; 이 부분에서 자꾸 "작동이 중지되었습니다"라는 오류창이 뜹니다.
add esp, 4
xor eax, eax
ret
; void myprint(int foo);
_myprint:
pop eax
push message
call _printf
add esp, 4
xor eax, eax
ret