flat assembler
Message board for the users of flat assembler.

Index > Main > extend the "#" syntax

Author
Thread Post new topic Reply to topic
Kevin_Zheng



Joined: 04 Jul 2003
Posts: 125
Location: China
Kevin_Zheng
Hi, Privalov:
Can you extend the "#" syntax to contatenate one symbol and "%" into one? Please see the below macro, It will help to implement that supported variable pararmeter on proc macro.
Code:
macro varg_parse num,arg
{
        repeat  num
         arg#.#% equ     arg+%*2
     end repeat              
}

arg   equ     bp
  varg_parse      2,arg
       
    mov     ax,[arg.1]
  mov     bx,[arg.2]
    

Thank you.
Post 18 Mar 2004, 03:01
View user's profile Send private message MSN Messenger Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7715
Location: Kraków, Poland
Tomasz Grysztar
The # operator works at preprocessor stage, when % symbols doesn't mean anything special. It is the assembly stage when % has assigned some special value (in the same way as $ symbol). The whole preprocessor is text-substitution-based only, there are no expression calculation or enumerating mechanism in the preprocessor.
Post 18 Mar 2004, 09:00
View user's profile Send private message Visit poster's website 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.

Powered by rwasa.