this is my code (test.asm)
expected "num = 1337"
output: "num = 4199373"
question: How do I fix it.
intent: curiosity towards assembly language, not assignment.
; nasm -fwin32 test.asm
; gcc test.obj -o test
extern _printf
global _main
section .text
_main:
push num
push msg
call _printf
add esp, 8
ret
msg db 'num = %i', 0xa, 0
num dd 1337
changing push num
to push dword [num]
fixed it.