•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 373,573 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,847 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:
FASM can output an executable PE directly, but sometimes you want to output an object file for linking with modules in other languages. The following program can be used to link with the C library of the GCC compiler with the following commands:
C:\>fasm hello.asm hello.obj
C:\>gcc hello.obj -o hello.exe
It's almost like magic!
C:\>fasm hello.asm hello.obj
C:\>gcc hello.obj -o hello.exe
It's almost like magic!
format MS COFF include 'C:\fasm\include\win32a.inc' ;====================================== section '.data' data readable writeable ;====================================== hello_msg db 'Hello, world!',0 ;======================================= section '.text' code readable executable ;======================================= public _main extrn '_printf' as printf _main: ccall printf,hello_msg xor eax,eax ret
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)