Jump to content
Welcome, welcome! Come in and register, and have some developer coffee. 👨‍💻 ×

Create your "Hello World" console app

Recommended Posts

It is just 1024 bytes:



format PE console

include 'win32a.inc'

; no section defined - fasm will automatically create .flat section for both
; code and data, and set entry point at the beginning of this section

        invoke  GetStdHandle, -11
        invoke  WriteConsole, eax, _message,_len,_dummy, 0
        invoke  ExitProcess,0

_message db 'Welcome to kaki.GG',13,10,0
_len     = $-_message
_dummy   dd ?

; import data in the same section

data import

 library kernel32,'KERNEL32.DLL'

 import kernel32,\
        GetStdHandle, 'GetStdHandle', \
        WriteConsole, 'WriteConsoleA', \

end data                 

It calls several Win32 APIs:




Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...