•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 375,273 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 2,194 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:
Some languages are hard to get started in. FASM appears to be one of these languages because the documentation is not detailed enough for a beginner. That's a shame because FASM is (in my opinion) one of the better assemblers. The following snippet is a simple Hello, world! program which FASM will directly output an executable on Windows.
The C run-time library is used by accessing the msvcrt DLL, so a linker isn't necessary.
The C run-time library is used by accessing the msvcrt DLL, so a linker isn't necessary.
format PE console entry start include 'C:\fasm\include\win32a.inc' ;====================================== section '.data' data readable writeable ;====================================== hello_msg db 'Hello, world!',0 ;======================================= section '.code' code readable executable ;======================================= start: ccall [printf],hello_msg ccall [getchar] stdcall [ExitProcess],0 ;==================================== section '.idata' import data readable ;==================================== library kernel,'kernel32.dll',\ msvcrt,'msvcrt.dll' import kernel,\ ExitProcess,'ExitProcess' import msvcrt,\ printf,'printf',\ getchar,'_fgetchar'
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)