I am trying to compile a hello world on windows with the ML and LINK that ship with VS 2010.
.MODEL FLAT
.STACK 4096
.data
msg db "Hello World!",0
.code
INCLUDELIB MSVCRT
EXTRN printf:NEAR
EXTRN exit:NEAR
PUBLIC _main
_main PROC
mov eax, offset msg
push eax
call printf
mov eax,0
push eax
call exit
_main ENDP
END _main
I keep getting linker errors saying that printf and exit are unresolved external symbols. I have a couple of questions.
- What are the command line options to use with ML and LINK to compile and resolve the error messages.
- Is there another way to display text output to the screen using assembly code rather than calling c runtime functions like printf?