flat assembler
Message board for the users of flat assembler.

Index > Main > Question about Proc32 Macros

Author
Thread Post new topic Reply to topic
Eoin



Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin 29 Aug 2005, 18:51
Hello all,

I've been away from Assembly for a while now, working mostly on C++ projects. I've recently downloaded the latest FASM versions and notice that there have been alot of changes to the macros.

Two things which have thrown me are
A) How do I include inline strings in the various procedure calling macros. I used to use the following macro
Code:
macro stdcall proc,[arg]
{  local ..cont
  reverse
   if arg eqtype ""
      call ..cont
      db arg, 0
      ..cont:
   else
      push arg
   end if
  common call proc }    

Which does still work but is there a new way.

B) How do I declare one of my own procedures as being C call (ideally allowing varargs but not a necessity). I imagine I need to make changes to the new prologue and epilogue macros but amn't sure.

Thanks all, regards Eoin.
Post 29 Aug 2005, 18:51
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 29 Aug 2005, 19:06
You can use declarations like "proc foo stdcall" or "proc bar c" - see Win32 headers documentation (or chapter 3 of the latest PDF manual).

The things like inline strings are done with redeclaring the "pushd", which is used by the stdcall and family to pass the parameters to procedure. See the "pushd" macro in WIN32AX.INC.
Post 29 Aug 2005, 19:06
View user's profile Send private message Visit poster's website Reply with quote
Eoin



Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin 30 Aug 2005, 00:24
Thank you very much.
Post 30 Aug 2005, 00:24
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.