Well we better get _printf working first. I don't know why I didn't notice it before now, but there's no way this is going to work!
section .data
msg:
db 'Addition is = %d',10,0
section .text
extern _printf
global _main
_main:
push ebp
mov esp,epb ; you want to move esp to ebp here!
mov eax,5
add eax,2
push eax
push msg
call _printf
pop ebp ; this is going to get the address of "msg" back off the stack
mov esp,ebp ; and put it in esp
ret ; go boom!
When you're using ebp as a frame pointer, you do NOT want to alter it within the function!
As I recall, we've got a working example of this in the "example code" section - a couple of pages in - called "integer in integer out" or some such...
Best,
Frank
Edit: Well my memory fails me. I can't find the example I had in mind. I could provide a Linux example. A 32-bit example "should" port to 'doze fairly easily. You probably want an example "known" to work in Windows...