flat assembler
Message board for the users of flat assembler.

flat assembler > Macroinstructions > Multi-line Comment macro

Author
Thread Post new topic Reply to topic
VitalOne



Joined: 29 Jul 2003
Posts: 54
Location: USA
I finally figured out some kind of way to do multiline comments.

Code:
macro comment [args] {
local useless
macro useless args
} 
    


It's pretty simple, and works kind of like how Pascal comments do. So now you could do:

Code:
comment { 
Something here
Or code not used
It works!
}
    


All it does is make a local macro, FASM doesn't check the code inside macros until they're used.
Post 09 Jan 2004, 06:48
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
Dryobates



Joined: 13 Jul 2003
Posts: 46
Location: Poland
That's what I need Smile
It's brilliant in it's simplicity (just like FASM)
Post 09 Jan 2004, 10:23
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
VitalOne



Joined: 29 Jul 2003
Posts: 54
Location: USA
Thanks Very Happy
Post 09 Jan 2004, 23:33
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
There is an older solution, using the (then newly introduced) fix directive by Joshua:
http://board.flatassembler.net/topic.php?p=512&highlight=macro+comment+fix#512

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 10 Jan 2004, 00:11
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
VitalOne



Joined: 29 Jul 2003
Posts: 54
Location: USA
Cool, you could also do
Code:
comment fix macro comment {
endcom fix }
    


Which would make it work like
Code:
comment
Comments here
......
endcom    
Post 10 Jan 2004, 00:30
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
VitalOne



Joined: 29 Jul 2003
Posts: 54
Location: USA
Hmm...this fix directive is powerful...if you're really don't want to type much you could just do
Code:
.. fix macro comment {
... fix }
    


To comment it's just like
Code:
..
Comment
Here
sadasdasd
...

Or use basically any symbol that's not reserved.    
Post 10 Jan 2004, 00:51
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
Dryobates



Joined: 13 Jul 2003
Posts: 46
Location: Poland
hmm... That would be nice if there would be some documentation about built-in macros (separatly from manual, which is only about compiler). Forum is nice place for this, but those macros, which are within the fasm package (e.g. invoke), should be documented and now macros like comment when it will apear in fasm package will be documented as well.
I can't do this. My english (and fasm using skills) are to weak Sad
Post 10 Jan 2004, 14:01
View user's profile Send private message AIM Address Yahoo Messenger 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-2018, Tomasz Grysztar.

Powered by rwasa.