flat assembler
Message board for the users of flat assembler.

Index > Windows > Totally new to Windows programming

Author
Thread Post new topic Reply to topic
shaolin007



Joined: 03 Sep 2004
Posts: 65
shaolin007 23 May 2005, 12:53
I'm making the jump from NASM to FASM since about everyone I know in assembly programming is saying it's alot better. I read the documentation for FASM and looked at some examples of Window API calls and my questions are this...

1. I use the 'invoke' 'directive?' to call an API function? Or instead of using that, do I need to tell FASM to use __stdcall and push my parameters onto the stack in reverse then call the function?

2. I use 'import' to import a library or dll?

3. I noticed that the examples have PE GUI, what exactly does this mean?

Sorry about all the questions but I have mainly been learning 16bit programming. Thanks in advance.
Post 23 May 2005, 12:53
View user's profile Send private message Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: US
coconut 23 May 2005, 15:32
1) invoke is a macro, that will create the standard call for you pushing the arguments in reverse

ie invoke display,hello,world
is
push world
push hello
call display

2) a dll yes, new versions of fasm allow you to just 'reference' the dll with import macro, only functions used will be referencedin your exe - see the examples in the fasm package for windows

3) this basically formats the source as a windows portable executable file, using gui interface instead of console/command line interface. you should use "format PE GUI 4.0" to have a modern gui in your apps instead of the old flat windows like win95 (win98 onwards is where the 4.0 comes from) if you dont specify any formatting, fasm will create a flat binary file
Post 23 May 2005, 15:32
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 23 May 2005, 15:40
Quote:

like win95 (win98 onwards is where the 4.0 comes from)

Actually it was Win95 that was 4.0 - the earlier ones with flat (and white by default) window style were Windows 3.11 and NT up to 3.51.
Post 23 May 2005, 15:40
View user's profile Send private message Visit poster's website Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: US
coconut 23 May 2005, 21:08
ah true, thanks for pointing that out
Post 23 May 2005, 21:08
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.