printf - Hello world does work in PE but not in PE64 -


i'm trying kind of write own x64 hello world program in fasm on windows tried rewrite version: how write console in fasm?, x64 program this:

format pe64  entry start  include 'win64a.inc'  section '.code' code readable executable start:     push hello     call [printf]     pop rcx      push 0     call [exitprocess]  section '.rdata' data readable     hello db 'hello world!', 10, 0  section '.idata' import data readable writeable     library kernel,'kernel32.dll', \         msvcrt,'msvcrt.dll'     import kernel, exitprocess,'exitprocess'     import msvcrt, printf, 'printf'   

now problem compiles fine, when executed doesn't print console.

why not work, printf of msvcrt silently incompatible x64? have overseen something?

can tell me how rewrite print "hello world!"?


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -