flat assembler
Message board for the users of flat assembler.

Index > Main > empty struct

Author
Thread Post new topic Reply to topic
realcr



Joined: 02 Apr 2007
Posts: 39
realcr
Hi.

I was trying to write code that implements empty struct , something like:

Code:
struct empty1
ends

e1 empty1  
    


However , I got the error code "illegal instruction" over the "e1 empty1" line.
Is it not possible to create empty structs in fasm? If not , do you know of an alternative way to do that?

You might be wondering why I want to have such thing as empty struct in my code. I wish to have some flags in the beginning of the code that if I put false , the struct will contain nothing , and it will have some stuff inside for true value.

realcr.
Post 21 Jun 2008, 17:55
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
TNick



Joined: 29 Jan 2008
Posts: 13
Location: Brasov, Romania
TNick
I find it natural to be informed that I tried to initialize some pice of memory with a macro not properly defined. I suggest to use "if" constructs like this:
Code:
InitMemPic1 = 1
struct someStruct x, y
 .x = x
 .y = y
ends 
...
if InitMemPic1 = 1
 e1 someStruct 1,2
end if    


Nick
Post 21 Jun 2008, 18:39
View user's profile Send private message Reply with quote
realcr



Joined: 02 Apr 2007
Posts: 39
realcr
Cool idea.

Thanks TNick.
Post 21 Jun 2008, 18:45
View user's profile Send private message Visit poster's website MSN Messenger 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.