flat assembler
Message board for the users of flat assembler.

Index > Windows > Explanation

Author
Thread Post new topic Reply to topic
ASMPQ



Joined: 10 May 2004
Posts: 3
ASMPQ 10 May 2004, 20:25
;MsgBox example: FASMW version
include '%include%\win32ax.inc'
.data
_MsgCaption db "Iczelion's tutorial no. 2",0
_MsgBoxText db "Win32 Assembly is Great!",0
.code
start:
invoke MessageBox, HWND_DESKTOP,\
_MsgBoxText, _MsgCaption, MB_ICONINFORMATION+MB_OK
exit:
invoke ExitProcess, 0

.end start


could somebody kinda break this down for me...i have a book but it dont explain the codes
Post 10 May 2004, 20:25
View user's profile Send private message Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: US
coconut 11 May 2004, 00:31
fasm syntax is pretty unqiue to other assemblers, probly not in any commercial book out there. this code is fasm compatible

Code:
format PE GUI 4.0 ;file type, win32 portable executable

include '%fasminc%\win32a.inc' ;for macros, constants

section '.data' readable writeable ;variables
    caption db 'hello world!',0
    title db 'flat assembler',0

section '.code' code executable readable ;code begins here
  start:
        invoke    0,text,caption,MB_INFORMATION+MB_OK ;call MessageBoxA
        invoke    ExitProcess,0 ;exit program

section '.idata' import data readable writeable ;win32 functions used
  library kernel,'KERNEL32.DLL',\
          user,'USER32.DLL'

  import kernel,\
         ExitProcess,'ExitProcess'

  import user,\
         MessageBox,'MessageBoxA'
    
Post 11 May 2004, 00:31
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.