flat assembler
Message board for the users of flat assembler.

Index > Windows > win api in asm (some dumb newbie questions)

Author
Thread Post new topic Reply to topic
Dr.X



Joined: 29 Aug 2003
Posts: 60
Location: St. Petersburg, Fl. USA.
Dr.X
Is "invoke" a keyword or a command?
Does all api interaction begin with "invoke" ?
WinAPI looks like C to me. Does Fasm have a built in C compiler?
Will there ever be peace in the middle east? Razz
Where can I find an example of opening and reading/writing a text file?
Do you think I'm a pest? Very Happy

TIA,
Dr.X
Post 20 Apr 2004, 04:13
View user's profile Send private message Visit poster's website Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: usa
coconut
invoke is a macro, to simplify calling the api in stdcall format. the "real" way to do it in assembly would be like below, note the parameters are pushed in reverse

Code:
push MB_OK
push _caption
push _text
push [hwnd]
call MessageBox
    


while invoke makes it easier to code and read

Code:
invoke MessageBox,[hwnd],_text,_caption,MB_OK
    


fasm compiling C code? lol.. anyways, practically all win32 api can be converted and used in assembly. you can use the CreateFile, WriteFile, and ReadFile functions to write/read a text file
Post 20 Apr 2004, 05:23
View user's profile Send private message Reply with quote
Dr.X



Joined: 29 Aug 2003
Posts: 60
Location: St. Petersburg, Fl. USA.
Dr.X
Quote:

invoke is a macro, to simplify calling the api in stdcall format.

Oh, ok. So I either learn about macros or just do it long hand in reverse. I'll learn the long way first so I can understand it, then I'll read up on macros. Smile
Quote:

fasm compiling C code? lol..

Told ya they were dumb questions Razz

Dr.X
Post 20 Apr 2004, 11:09
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Quote:

Oh, ok. So I either learn about macros or just do it long hand in reverse. I'll learn the long way first so I can understand it, then I'll read up on macros.

nice approach, i like kind of people like you (reading tutorial slowly and carefully, not using macros to better understanding in price of saving little time), really, you have what it needs to be good asm coder.
Post 20 Apr 2004, 18:21
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: usa
coconut
as long as you remember to push the parameters/arguments in reverse, youll have no problem. any specific help/translations ya need just post here, ill try and help out as much as i can
Post 20 Apr 2004, 20:55
View user's profile Send private message Reply with quote
Dr.X



Joined: 29 Aug 2003
Posts: 60
Location: St. Petersburg, Fl. USA.
Dr.X
Quote:

nice approach, i like kind of people like you (reading tutorial slowly and carefully, not using macros to better understanding in price of saving little time), really, you have what it needs to be good asm coder.

Thanks Vid. I hope I can live up to that. Very Happy
Dr.X
Post 20 Apr 2004, 22:25
View user's profile Send private message Visit poster's website Reply with quote
Dr.X



Joined: 29 Aug 2003
Posts: 60
Location: St. Petersburg, Fl. USA.
Dr.X
Quote:

as long as you remember to push the parameters/arguments in reverse, youll have no problem. any specific help/translations ya need just post here, ill try and help out as much as i can

I hope I don't pester you too much with my dumb questions. Wink
Dr.X
Post 20 Apr 2004, 22:26
View user's profile Send private message Visit poster's website Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: usa
coconut
no question is dumb, look at all my posts here im learning too =]. there are some great minds here willing to help out
Post 21 Apr 2004, 02:40
View user's profile Send private message Reply with quote
Dr.X



Joined: 29 Aug 2003
Posts: 60
Location: St. Petersburg, Fl. USA.
Dr.X
Quote:

no question is dumb

If there is no dumb questions, then leave it to me to make a few up. Laughing
Dr.X
Post 21 Apr 2004, 13:12
View user's profile Send private message Visit poster's website Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: usa
coconut
lol
Post 21 Apr 2004, 21:07
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.