flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Bug Found?

Author
Thread Post new topic Reply to topic
JPowersFairfax



Joined: 25 Jan 2012
Posts: 11
Location: Virginia
JPowersFairfax 25 Jan 2012, 20:13
I put the following in my code and it caused FASM to report an "Out of memory" error (after taking a fairly long time to run). Once I realized that I had forgotten the backslashes before the curly braces on the inner struc definition and added them, FASM no longer reported the error. I think the lack of backslashes caused the macro processor to enter an infinite loop for some reason.

Is this a bug?

Code:
macro SP_DATA_NO_INIT   ; included in 'data_no_init.asm'
{
   struc SP_ITEM_DATA
   {
      ;-- INPUT -- MUST BE INITIALIZED PRIOR TO CALLING PROCS ------
      .wefwef      rd 1
      .qweqwe       rd 1
      .zxczxc   rd 1
      .tyutyu       rd 1
      ;-- OUTPUT ---------------------------------------------------
      .iopiop      rd 1
      .ertert       rd 1
   }
}
    
Post 25 Jan 2012, 20:13
View user's profile Send private message Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1619
Location: Toronto, Canada
AsmGuru62 25 Jan 2012, 21:25
You have nice naming convention!
Post 25 Jan 2012, 21:25
View user's profile Send private message Send e-mail Reply with quote
JPowersFairfax



Joined: 25 Jan 2012
Posts: 11
Location: Virginia
JPowersFairfax 25 Jan 2012, 21:29
Thanks! Well, I admit I changed the field names to random garbage to hide what I was using the structure for. I'm pathologically secretive that way.
Post 25 Jan 2012, 21:29
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 26 Jan 2012, 01:11
You have to "escape" the inner closing curly bracket:
Code:
...
      .ertert       rd 1
   \} ;<--- add the backslash here
}    
Post 26 Jan 2012, 01:11
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.