flat assembler
Message board for the users of flat assembler.

flat assembler > Macroinstructions > Tell me somebody where is error

Author
Thread Post new topic Reply to topic
Dunduk



Joined: 08 Sep 2003
Posts: 38
Location: Russia
Hi everybody
I wrote this macro (for self-education):
Code:
macro regstruc reg,arg,strucname,name
  {
    mov reg,arg
    virtual at reg
      if ~defined def#name
        def#name = 1
        name strucname
      end if
    end virtual
  }
    

For such use, for example:
Code:
regstruc  edi,wc,WNDCLASS,edi_wc
...
mov   [edi_wc.hbrBackground], COLOR_BTNFACE+1
    

But fasm compiles this code for a long-long time without end and error message... Where I am wrong, tell me please.
Post 07 Apr 2004, 10:25
View user's profile Send private message Reply with quote
S.T.A.S.



Joined: 09 Jan 2004
Posts: 173
Location: Ru#27
I guess here

if ~defined def#name
def#name = 1

[added]
Here is some variant of assume macro - it uses localized names to avoid stuff like "def#name = 1"
Post 07 Apr 2004, 13:35
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-2019, Tomasz Grysztar.

Powered by rwasa.