flat assembler
Message board for the users of flat assembler.

flat assembler > Macroinstructions > complex call

Author
Thread Post new topic Reply to topic
uri



Joined: 09 Apr 2004
Posts: 44
Location: L'viv, Ukraine
Nested function calls. For all:
Code:
     call    equ
macro    call    name,[arg]
{
common  if ~ arg eq
reverse  pushd   arg
common   end if
      CALL    name
}

macro     push    [arg]
{
common
   if      arg eq ?
            push    0
   else if arg eqtype ''
             local ..
            .data
               if      defined UNICODE
                     .. du arg,0
         else
                        .. db arg,0
         end if
              .code
               push    ..
  else
                push    dword arg
   end if
}
macro       pushd   [arg]
{
common
   if      _#arg eq _call arg
          arg
         push    eax
 else
                push    arg
 end if
}

macro   call    name,[arg]
{
common  if ~ arg eq
reverse  pushd   arg
common   end if
      call    name
}

;usage:
   call    last,1,<call last,'ansi text'>,?,<call last,4,<call last,5>,6>,7
;or
UNICODE=1
    call    last,1,<call last,'unicode text'>,?,<call last,4,<call last,5>,6>,7

last: ret
    
Post 17 May 2004, 16:25
View user's profile Send private message Visit poster's website ICQ Number 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-2019, Tomasz Grysztar.

Powered by rwasa.